what is the command used to run the matlab code line by line?

43 vues (au cours des 30 derniers jours)
I have been getting different peak values while using the for loop. But the obtained peak locations are wrong, so i need to check what is happening in my code. How can i check my code line by line?

Réponse acceptée

Walter Roberson
Walter Roberson le 23 Oct 2016
Once you are stopped at a breakpoint, you can use dbstep, or if you are in the editor you can click on "step" or "step into". The easiest way to get a breakpoint is to click on the little black mark just to the right of the line number of an executable line, but you can also use the command "dbstop" to set a breakpoint.
  1 commentaire
Steven Lord
Steven Lord le 23 Oct 2016
For more information about how to set and use breakpoints, search the documentation included in your installation of MATLAB for the term "breakpoint". You can open that documentation using the doc command.

Connectez-vous pour commenter.

Plus de réponses (1)

Image Analyst
Image Analyst le 23 Oct 2016
Type the F10 key. Or you can use Step button on Editor tab of the toolribbon.

Catégories

En savoir plus sur Entering Commands dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by