skipping code sections when running the code
이전 댓글 표시
Suppose I have 30 code sections and test the 23rd one. It would be cumbersome that I need to run 22 sections each time. Suppose I want to skip 11th one that does not affect the other ones. Is there any simpler way to do this?
답변 (2개)
Mike Danielsen
2018년 12월 23일
2 개 추천
Use this commenting function
%{
This wont run
%}
--------------------
%
This will run
%}
John D'Errico
2018년 6월 13일
편집: John D'Errico
2018년 6월 13일
0 개 추천
If this is a script, then learn how to use cell mode.
Learn about live scripts.
If this is a function, then learn to write functions in a modular way.
If you can't handle either of the above, then copy the block of code out, put it into a separate file, then execute that.
Or just copy and paste the code into the command window as a block.
댓글 수: 1
Clifford Tatum
2019년 8월 30일
'if you cant handle'...^...come on bro
카테고리
도움말 센터 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!