Clear Filters
Clear Filters

How to apply tangent function to each element in a cell array?

1 view (last 30 days)
suppose, slope={ [ ], [-0.076,-1.45,-20.5,-0.49], [ ] }; I want to get the angles(radians or degrees) by applying tangent function. How do I do it?

Accepted Answer

Walter Roberson
Walter Roberson on 16 Jan 2019
cellfun(@tan, slope, 'uniform', 0)

More Answers (0)

Categories

Find more on Data Types 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!