Matlab if statements in physics
Ältere Kommentare anzeigen
What does the condition mean in Matlab, where x and y are the displacement that measures from [-1,1]
if (abs(x)>=1)
x=sign(x);
end
if (abs(y)>=1)
y=sign(y);
end
2 Kommentare
Walter Roberson
am 18 Okt. 2018
The code is checking to see if the values are out of range and if so moving them to the boundary.
Momo
am 19 Okt. 2018
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Elementary Math finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!