mapping of datas in -pi to pi to 0 to 2*pi
13 views (last 30 days)
Show older comments
I have datas in the range -pi to pi. How it can be converted in the range 0 to 2*pi ?
Answers (4)
Bruno Luong
on 17 Jul 2020
data_0_2pi = mod(data,2*pi)
the domain of data does not matter actually.
0 Comments
Image Analyst
on 18 Jul 2020
Do you want to just shift, like this
data = data + pi;
or do you want to shift and rescale, like this:
data = rescale(data, 0, 2*pi);
??? The second snippet will take your min value and move it to zero, and make your max value 2*pi, and values in between will be proportionally linearly scaled.
0 Comments
See Also
Categories
Find more on Data Import and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!