matlab命令行调试程序的命令列表

来源:互联网 发布:加密软件坏了 编辑:程序博客网 时间:2024/05/16 07:23

命令列表如下,来自maltab2010 help文档的Simulink/User's Guide/Managing Blocks/Using the Embedded MATLAB Function Block/Debugging an Embedded MATLAB Function Block 

 

 

 

CommandDescription

ctrl-c

Quit debugging and terminate simulation.

dbcont

Continue execution to next breakpoint.

dbquit

Quit debugging and terminate simulation.

dbstep [in|out]

Advance to next program step after a breakpoint is encountered.Step over or step into/out of an Embedded MATLAB subfunction.

help

Display help for command line debugging.

print <var>

Display the value of the variable var inthe current scope. If var is a vector or matrix,you can also index into var. For example, var(1,2).

save

Saves all variables in the current scope to the specifiedfile. Follows the syntax of the MATLAB save command.To retrieve variables to the MATLAB base workspace, use load command after simulation has beenended.

 

 

翻译如下:

 

 

命令描述

ctrl-c

结束调试,终止仿真

dbcont

继续执行到下一个断电

dbquit

结束调试,终止仿真

dbstep [in|out]

当遇到断点时,执行下一步进入或者一步执行过子函数

help

显示help文档

print <var>

显示当前scope中的变量 var in 如果 var 是个向量或矩阵你可以索引变量 var. 例如, var(1,2).

save

保存变量到某个文件中。和matlab命令 save一样的用法.恢复某个变量到matlab工作空间,,使用 load 命令

<var>

如果变量在当前scope,和 "print <var>"一样

who

显示当前scope的变量

whos

显示当前scope中所有变量的类型和大小

原创粉丝点击