フィルターのクリア

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

5 ビュー (過去 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 Center および File ExchangeAxis Labels についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by