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

 Risposta accettata

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

Più risposte (0)

Prodotti

Tag

Richiesto:

il 25 Feb 2016

Risposto:

il 25 Feb 2016

Community Treasure Hunt

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

Start Hunting!

Translated by