for loop

Hi everyone,
I want to tidy up lots of for loops I have. I have confused which end in belongs to which 'if' or 'for'. I know there is a very to tidy up, but I can not remember. Would you please help me on that. Thank you!
S.

답변 (1개)

Jos (10584)
Jos (10584) 2011년 3월 22일

1 개 추천

In the Matlab Editor,
  1. select the text you want to tidy up
  2. use the menu "Text" -> "Smart Indent" (or the shortcut, which is cmd-I on the Mac, and something similar on PC's)

댓글 수: 6

S
S 2011년 3월 22일
That's it! Thank you so much Jos, It was really on my nerves:)
Matt Tearle
Matt Tearle 2011년 3월 22일
On a PC:
ctrl-A
ctrl-I
My fingers do it without my brain having to tell them to!
Walter Roberson
Walter Roberson 2011년 3월 22일
But it still bugs me that it has to be control-I and not the tab key!
Matt Tearle
Matt Tearle 2011년 3월 22일
Never thought of the tab as a mass indent operator. What bugs me is that ctrl-I unfolds everything.
Andrew Newell
Andrew Newell 2011년 3월 23일
I never thought of tab that way either, but it would be very tidy!
Matt Fig
Matt Fig 2011년 3월 23일
It doesn't matter to me what the shortcut key is, I am just glad TMW included one to do the job.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

질문:

S
S
2011년 3월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by