how to organize your code in blocks

hi,
I wonder if it's possible to regroup (minimize) some parts of your code. Matlab offers this with for loop, but could it be possible to do so with any lines? For example let's say I have :
% I want
% to minimize
% this portion of code
and with some (magic) trick, now I could see something shorter like:
[+] % I want
Thx

 채택된 답변

Walter Roberson
Walter Roberson 2011년 12월 9일

1 개 추천

You could put the code in a cell, and enable code folding for cells. See http://blogs.mathworks.com/desktop/2009/06/15/fold-whatever-you-want-using-cells/

추가 답변 (1개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by