Clear Filters
Clear Filters

Jump to the next point at looping

1 view (last 30 days)
Thales Follador de Oliveira
Edited: Geoff Hayes on 19 Dec 2016
Hi! I would like to jump one step inside a loop, for example:
n = "number"
for i = 1:0.01:n
x = "equation"
end
If one step of the loop takes to long to conclude, how can i "jump" this value of "i" to the next term?
Thank you a lot for your time! See you!
  1 Comment
Geoff Hayes
Geoff Hayes on 19 Dec 2016
Edited: Geoff Hayes on 19 Dec 2016
Thales - how will you measure how long one step of the loop takes to long to conclude? Typically, you would use continue to skip to the next iteration but you will need some mechanism in order to make that decision to call it.

Sign in to comment.

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!