MATLAB Answers

0

Debugging matlab functions within simulink

Asked by Rajan Bedi on 18 May 2018
Latest activity Answered by Ameer Hamza
on 18 May 2018

1. Simulink is not allowing me to set breakpoints with an imported Matlab function, nor step (only run) and I am also unable to display the value of a connection between blocks during simulation (even though I have enabled this). Any ideas why?

2. Rather than create a new user-defined matlab model within simulink, can one import a known good function previously developed within matlab?

Kind Regards, Rajan

  1 Comment

I think the reason is the fact that I has selected the fast, as opposed to normal, simulation mode.

Still unable to display the value of a connection between blocks during simulation and variable values.

Sign in to comment.

Products


Release

R2014b

1 Answer

Answer by Ameer Hamza
on 18 May 2018

If you are not able to see the values of the signals during simulation, then you can log the signal data and then view it using Data Inspector. Right-click the signal connection and click Log Selected Signal. Then view logged values by double-clicking the antenna symbol appearing over the connection. Similarly, you can also use Simulink debugger for more control over debugging and spotting which block is creating problems.

  0 Comments

Sign in to comment.