wraptopi without mapping toolbox

23 views (last 30 days)
Anjali Sharma
Anjali Sharma on 20 Oct 2020
Edited: LongYao Li on 10 Oct 2021
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?

Accepted Answer

Ameer Hamza
Ameer Hamza on 20 Oct 2020
Something like this
x = 3.3*pi;
wraped_x = mod(x+pi, 2*pi)-pi;
  1 Comment
LongYao Li
LongYao Li on 10 Oct 2021
Edited: LongYao Li on 10 Oct 2021
like this?
x=3.3*pi;
wraped_x = x-floor((x+pi)/(2*pi))*2*pi;

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!