MATLAB: How to apply tangent function to each element in a cell array

cell arraystrignometric function

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?

Best Answer

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