wraptopi without mapping toolbox

I dont have mapping toolbox with my license and I need to carry out wrap to pi for my data. Is there any way to do the same without the mapping toolbox?

 Risposta accettata

Something like this
x = 3.3*pi;
wraped_x = mod(x+pi, 2*pi)-pi;

1 Commento

LongYao Li
LongYao Li il 10 Ott 2021
Modificato: LongYao Li il 10 Ott 2021
like this?
x=3.3*pi;
wraped_x = x-floor((x+pi)/(2*pi))*2*pi;

Accedi per commentare.

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by