I have a phase plot in radians varying from 20 to 26 (a linear graph), how do i convert this plot from -pi to +pi or from 0 to 2 pi?

1 view (last 30 days)
I have a phase plot in radians varying from values 20 to 26 (a linear graph) for a ring resonator , how do i convert this plot from -pi to +pi or from 0 to 2 pi?

Accepted Answer

Voss
Voss on 14 Dec 2021
phases = 20:26 % phases going from 20 to 26 radians
phases = 1×7
20 21 22 23 24 25 26
phases = mod(phases,2*pi) % the same phase values, now between 0 and 2 pi
phases = 1×7
1.1504 2.1504 3.1504 4.1504 5.1504 6.1504 0.8673
phases = phases - pi % the same phase values, now between -pi and +pi
phases = 1×7
-1.9911 -0.9911 0.0089 1.0089 2.0089 3.0089 -2.2743

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!