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

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?

 採用された回答

Walter Roberson
Walter Roberson 2019 年 1 月 16 日

0 投票

cellfun(@tan, slope, 'uniform', 0)

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by