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!