how to write for(i=count;i>1;i--) in matlab.

5 views (last 30 days)
chan
chan on 1 Feb 2016
Edited: Stephen23 on 1 Feb 2016
If I write like for i=5:-1:1 I got the value 54321 But I want to avoid 1 in the output.how to write syntax in matlab for this condition for(i=count;i>1;i--)
  1 Comment
Stephen23
Stephen23 on 1 Feb 2016
Edited: Stephen23 on 1 Feb 2016
5:-1:2
Did you try this?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by