How can I change values in a table using a function and using the values in the function (if-function)?
이전 댓글 표시
I have a column in a table with the variable name footangle (example)
foot angle
-10.55
8.864
-12.801
168.63
-170.196
165.661
-167.901
175.266
12.006
-10.485
Function:
Values greater than 90 Should be subtracted from the value 180. Values smaller than -90 should be added to 180, but keep the minus. All other values are to be maintained.
In other words:
if TableName.footanlge > 90
TableName.footanlge = 180 - footangle
else TableName.footanlge < -90
TableName.footanlge = (-1) * (180 + footangle)
end
How do I adapt the formula so that it works in Mathlab?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!