How can I change values in a table using a function and using the values in the function (if-function)?
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!