- There is no such thing as an IF loop.
- IF statements do not filter elements out of an array.
- MATLAB does not use a THEN keyword.
How to solve a simple if loop
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a variable that ranges between 0.01 and 0.62. I want to find all values of that single vector that exceed 0.59 and make them equal 0.59.
I tried running an if statement and it runs with no errors, but the variable does not change (there are still #s in that variable that are greater than 0.6). the code I have now that doesn't work:
if Theta>0.59
then (Theta=0.59);
end
What am I doing wrong?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Performance 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!