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!