For Loop with two constraints
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everyone, I have a really simple question.
How can I write a 'For' loop with two constraints :
- y1>f(y2) - function f is known
- y2= a:b
I write that :
for y2=a:b
for y1>f(y2) - it does not seem to work
P=X
end
end
Thanks,
2 Kommentare
Image Analyst
am 2 Sep. 2012
Next time, you can highlight your code and click the "{} Code" icon above to format your code properly. I did it for you this time. For your problem, you used "for y1..." instead of "if y1..."
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!