Matlab if statements in physics
古いコメントを表示
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 件のコメント
Walter Roberson
2018 年 10 月 18 日
The code is checking to see if the values are out of range and if so moving them to the boundary.
Momo
2018 年 10 月 19 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Elementary Math についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!