以编程方式调试仿真
在 MATLAB® 命令行窗口中调试和分析仿真,设置断点,步进时间步和模块方法
Simulink® 调试编程接口在 MATLAB 命令行窗口中提供与 Simulink 编辑器中类似的调试选项。此外,您还可以使用编程接口来执行以下操作:
以一次执行一个模块方法的方式步进模型仿真。
在模块方法上设置断点。
设置其他模型断点,如求解器重置断点。
显示有关模型的其他信息,包括非虚拟子系统的列表。
仅在启动调试会话后,仿真调试会话中用于控制数据显示和模型执行的函数才可用。
函数
sldebug | 启动 Simulink 模型的仿真调试会话 |
bafter | Insert breakpoint after specified method in simulation debugging session |
break | Insert breakpoint before specified method in simulation debugging session |
clear | 清除仿真调试会话中的断点 |
continue | 继续仿真调试会话 |
ebreak | Set or clear breakpoint to pause when solver error occurs in simulation debugging session |
emode | Switch between accelerator and normal mode during simulation debugging session |
nanbreak | Set or clear breakpoint to pause when Inf or
NaN value occurs in simulation debugging session |
next | Progress simulation debugging session to start of next method in model execution list |
quit | 结束仿真调试会话 |
rbreak | Configure simulation debugging session to pause before solver reset |
run | Run simulation debugging session from current point to end of simulation, ignoring breakpoints |
step | 按指定增量推进仿真 |
stop | 停止仿真调试会话 |
tbreak | Set or clear breakpoint that pauses simulation debugging session at specified time |
xbreak | Set or clear breakpoint to pause when state limits step size in simulation debugging session |
zcbreak | Configure simulation debugging session to pause when nonsampled zero-crossing events occur |
ashow | Identify and highlight algebraic loops in simulation debugging session |
atrace | Configure simulation debugging session to display information each time algebraic loop is solved |
bshow | Highlight block in model with specified block ID during simulation debugging session |
disp | 当仿真调试会话暂停时,显示有关指定模块的信息 |
elist | Display execution order in simulation debugging session |
etrace | Configure simulation debugging session to display information when entering and exiting methods |
help | 在仿真调试会话期间显示 Simulink 调试编程接口的帮助 |
probe | Display input, output, and state data for specified block in simulation debugging session |
slist | Display sorted list of blocks in model during simulation debugging session |
states | Display state values during simulation debugging session |
status | Display options used in current simulation debugging session |
stimes | Display information about sample times in model during simulation debugging session |
strace | Display solver information in simulation debugging session |
systems | List nonvirtual subsystems in model or model hierarchy during simulation debugging session |
trace | 每次模块执行时,在仿真调试会话中显示指定模块的信息 |
undisp | Remove display point in simulation debugging session |
untrace | Remove trace point in simulation debugging session |
where | 在仿真调试会话期间显示仿真循环内的当前位置 |
zclist | List blocks that detect zero crossings in simulation debugging session |
主题
- Simulink Debugging Programmatic Interface
Learn the basics of the Simulink debugging programmatic interface.
相关信息
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)