Matlab if statements in physics
Afficher commentaires plus anciens
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 commentaires
Walter Roberson
le 18 Oct 2018
The code is checking to see if the values are out of range and if so moving them to the boundary.
Momo
le 19 Oct 2018
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Elementary Math dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!