Display current value of Embedded MATLAB function variable

3 次查看(过去 30 天)
Is it possible to display the current value of signals within an Embedded MATLAB function while a Simulink model is running (similar to when you hold your cursor over variables when the code is stopped)? I want to do this for troubleshooting without having to add extra outputs and displays to my EML.

回答(1 个)

Kaustubha Govind
Kaustubha Govind 2011-5-16
You should be able to debug an Embedded MATLAB Function block by selecting "Enable Debugging" from the Debug menu.
See Debugging a MATLAB Function Block for more information.
  2 个评论
Andrew
Andrew 2011-5-16
Thanks. I read on the link you provided that the current values for a variable should pop up during simulation when my cursor is over it. Is this a new feature of R2011a? I am running 10b, and this does not work until the simulation is paused.
Kaustubha Govind
Kaustubha Govind 2011-5-16
Do you mean that you need to hit the pause button to see this? Doesn't the simulation pause anyway when it hits the breakpoint?
The doc for R2010b seems to suggest that this feature existed in that release also (Type web([docroot '/toolbox/simulink/ug/f6-87946.html']) at MATLAB prompt to open up the relevant page and click on "Watching Function Variables During Simulation")

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by