How can I change all negative angles in 20 x 5000 cells to positive? i.e. -167deg. to 193deg.

9 次查看(过去 30 天)
Hi, I am new to MATLAB. Please see the title.
I need to keep the positives unchanged.
Cheers,
Ed

采纳的回答

Guillaume
Guillaume 2016-2-25
The modulo operation is your friend:
angles = [-167 0; 90 -270] %for example
angles = mod(angles, 360)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by