ImageVerifierCode 换一换
格式:DOCX , 页数:6 ,大小:17.08KB ,
资源ID:4115200      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/4115200.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Matlab程序调试相关函数.docx)为本站会员(b****3)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

Matlab程序调试相关函数.docx

1、Matlab程序调试相关函数kyboard:KEYBOARD Invoke keyboard from M-file.KEYBOARD, when placed in an M-file, stops execution of the fileand gives control to the users keyboard. The special status isindicated by a K appearing before the prompt. Variables may beexamined or changed - all MATLAB commands are valid. T

2、he keyboardmode is terminated by executing the command RETURN (i.e. typingthe six letters R-E-T-U-R-N and pressing the return key. Controlreturns to the invoking M-file.DBQUIT can also be used to get out of keyboard mode but in this casethe invoking M-file is terminated.The keyboard mode is useful f

3、or debugging your M-files.See also dbquit, dbstop, return, input.Reference page in Help browser doc keyboarddbquit:Quit debug mode.The DBQUIT command immediately terminates debug mode and returnscontrol to the base workspace prompt. The M-file being processedis NOT completed and no results are retur

4、ned.See also dbstop, dbcont, dbstep, dbclear, dbtype, dbstack, dbup,dbdown, and dbstatus.Reference page in Help browser doc dbquitdbstop:Set breakpoint.The DBSTOP command is used to temporarily stop the execution of an M-fileand give the user an opportunity to examine the local workspace. There ares

5、everal forms to this command. They are:(1 DBSTOP in MFILE at LINENO(2 DBSTOP in MFILE at LINENO(3 DBSTOP in MFILE at LINENON(4 DBSTOP in MFILE at SUBFUN(5 DBSTOP in MFILE(6 DBSTOP in MFILE at LINENO if EXPRESSION(7 DBSTOP in MFILE at LINENO if EXPRESSION(8 DBSTOP in MFILE at LINENON if EXPRESSION(9

6、DBSTOP in MFILE at SUBFUN if EXPRESSION(10 DBSTOP in MFILE if EXPRESSION(11 DBSTOP if error(12 DBSTOP if caught error(13 DBSTOP if warning(14 DBSTOP if naninf or DBSTOP if infnan(15 DBSTOP if error IDENTIFIER(16 DBSTOP if caught error IDENTIFIER(17 DBSTOP if warning IDENTIFIERMFILE must be the name

7、of an M-file or a MATLABPATH-relative partialpathname (see PARTIALPATH. LINENO is a line number within MFILE, N is aninteger specifying the Nth anonymous function on the line, and SUBFUNis the name of a subfunction within MFILE. EXPRESSION is a string containinga evaluatable conditional expression.

8、IDENTIFIER is a MATLAB MessageIdentifier (see help for ERROR for a description of messageidentifiers. The AT and IN keywords are optional.The forms behave as follows:(1 Stops at the specified line number in MFILE.(2 Stops just after any call to the first anonymous functionin the specified line numbe

9、r in MFILE.(3 As (2, but just after any call to the Nth anonymous function.(4 Stops at the specified subfunction of MFILE.(5 Stops at the first executable line in MFILE.(6-10 As (1-(5, except only stops if EXPRESSION evaluates totrue. EXPRESSION is evaluated (as if by EV AL in MFILEs workspacewhen t

10、he breakpoint is encountered, and must evaluate to a scalarlogical value (true or false.(11 Causes a stop in any M-file function causing a run-time error thatwould not be detected within a TRY.CATCH block.You cannot resume M-file execution after an uncaught run-time error.(12 Causes a stop in any M-

11、file function causing a run-time error thatwould be detected within a TRY.CATCH block. You can resume M-fileexecution after a caught run-time error.(13 Causes a stop in any M-file function causing a run-time warning.(14 Causes a stop in any M-file function where an infinite value (Infor Not-a-Number

12、 (NaN is detected.(15-17 As (11-(13, except that MATLAB only stops on an error or warningwhose message identifier is IDENTIFIER. (If IDENTIFIER is the specialstring all, then these uses behave exactly like (11-(13.When MATLAB reaches a breakpoint, it enters debug mode. The prompt changesto a K and,

13、depending on the Open M-Files when Debugging setting in theDebug menu, the debugger window may become active. Any MATLAB command isallowed at the prompt. To resume M-file execution, use DBCONT or DBSTEP. Toexit from the debugger, use DBQUIT.dbclear:Remove breakpoint.The DBCLEAR command removes the b

14、reakpoint set by a corresponding DBSTOPcommand. There are several forms to this command. They are:(1 DBCLEAR in MFILE at LINENO(2 DBCLEAR in MFILE at LINENO(3 DBCLEAR in MFILE at LINENON(4 DBCLEAR in MFILE at SUBFUN(5 DBCLEAR in MFILE(6 DBCLEAR if ERROR(7 DBCLEAR if CAUGHT ERROR(8 DBCLEAR if WARNING

15、(9 DBCLEAR if NANINF or DBCLEAR if INFNAN(10 DBCLEAR if ERROR IDENTIFIER(11 DBCLEAR if CAUGHT ERROR IDENTIFIER(12 DBCLEAR if WARNING IDENTIFIER(13 DBCLEAR ALLMFILE must be the name of an M-file or a MATLABPATH-relative partialpathname (see PARTIALPATH. LINENO is a line number within MFILE, and SUBFU

16、Nis the name of a subfunction within MFILE. IDENTIFIER is a MATLAB MessageIdentifier (see help for ERROR for a description of messageidentifiers. The AT and IN keywords are optional.The several forms behave as follows:(1 Removes the breakpoint at line LINENO in MFILE.(2 Removes the breakpoint in the

17、 first anonymous function at line LINENOin MFILE.(3 Removes the breakpoint in the Nth anonymous function at line LINENOin MFILE. (Use this when there is more than one anonymous functionon the same line.(4 Removes all breakpoints in the specified subfunction of MFILE.(5 Removes all breakpoints in MFI

18、LE.(6 Clears the DBSTOP IF ERROR statement and any DBSTOP IF ERRORIDENTIFIER statements, if set.(7 Clears the DBSTOP IF CAUGHT ERROR statement, and any DBSTOP IF CAUGHTERROR IDENTIFIER statements, if set.(8 Clears the DBSTOP IF WARNING statement, and any DBSTOP IF WARNINGIDENTIFIER statements, if se

19、t.(9 Clears the DBSTOP on infinities and NaNs, if set.(10 Clears the DBSTOP IF ERROR IDENTIFIER statement for the specifiedIDENTIFIER. It is an error to clear this setting on a specificidentifier if DBSTOP IF ERROR or DBSTOP IF ERROR ALL is set.(11 Clears the DBSTOP IF CAUGHT ERROR IDENTIFIER statem

20、ent for the specifiedIDENTIFIER. It is an error to clear this setting on a specificidentifier if DBSTOP if caught error or DBSTOP if caught ERROR allis set.(12 Clears the DBSTOP IF WARNING IDENTIFIER statement for the specifiedIDENTIFIER. It is an error to clear this setting on a specificidentifier

21、if DBSTOP IF WARNING or DBSTOP IF WARNING ALL is set.(13 Removes all breakpoints in all M-files, as well as those mentioned in(6-(9 above.See also dbstep, dbstop, dbcont, dbtype, dbstack, dbup, dbdown, dbstatus, dbquit, error, partialpath, try, warning.Reference page in Help browser doc dbcleardbcon

22、t:Continue execution.The DBCONT command resumes execution of an M-file following a stop inexecution caused by either a DBSTOP or DBSTEP command. Execution willcontinue until either another breakpoint is encountered, an erroroccurs, or MATLAB returns to the base workspace prompt.See also dbquit, dbst

23、ep, dbstop, dbclear, dbtype, dbstack, dbup, dbdown, dbstatus.Reference page in Help browserdoc dbcontdbstatus :List all breakpoints.DBSTATUS, by itself, displays a list of all the breakpoints the debuggerknows about including ERROR, CAUGHT ERROR, WARNING, and NANINF.DBSTATUS MFILE displays the break

24、points set for the specified M-file. MFILEmust be the name of an m-file function or a MATLABPATH relative partialpathname (see PARTIALPATH.DBSTATUS(-completenames outputs the complete name of each function.A complete name includes the absolute file name and the entire sequence offunctions that nest

25、the function in which a breakpoint is set.S = DBSTATUS(. returns the breakpoint information in an M-by-1structure with the fields:name - function name.file - full name of the file containing breakpoint(s.line - vector of breakpoint line numbers.anonymous - integer vector, each element of which corre

26、sponds to an element of the line field. Each positive element represents a breakpoint in the body of an anonymous function on that line. For example, a breakpoint in the body of the second anonymous function on the line results in the value 2 in this vector. If an element is 0, the breakpoint is at

27、the beginning of the line, i.e., not in an anonymous function. expression - cell vector of breakpoint conditional expression strings corresponding to lines in the line field. cond - condition string (error, caught error, warning, or naninf. identifier - when cond is one of error, caught error, or wa

28、rning, a cell vector of MATLAB Message Identifier strings for which the particular cond state is set. See also dbstep, dbstop, dbcont, dbclear, dbtype, dbstack, dbup, dbdown, dbquit, error, partialpath, warning. Reference page in Help browser doc dbstatus dbstack: Display function call stack. The DB

29、STACK command displays the M-file function name and line number where the breakpoint occurred, the name and line number of the M-file caller, the callers caller, etc., until the top-most M-file function is reached. DBSTACK(N omits from the display the first N frames. This is useful when issuing a db

30、stack from within, say, an error handler. DBSTACK(-completenames outputs the complete name of each function in the stack, which means the absolute file name and the entire sequence of functions that nest the function in the stack frame. Either none, one, or both of the N and -completenames may appea

31、r. If both appear, the order is irrelevant. ST,I = DBSTACK returns the stack trace information in an M-by-1 6 structure ST with the fields: file - the file in which the function appears; this field will be the empty string if there is no file. name - function name within the file line - function lin

32、e number The current workspace index is returned in I. If you step past the end of an M-file, then DBSTACK returns a negative line number value to identify that special case. For example, if the last line to be executed is line 15, then the DBSTACK line number is 15 before you execute that line and -15 afterwards. See also

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1