How can i unwrap the phase of my plot?
15 views (last 30 days)
Show older comments
Hello Everyone, please can anyone help me with my code? It can be found attached.
After my code is compiled i get a phase vs temperature plot that is continuous while i want to have a sawtooth likewise behaviour at 360 degrees. Basically i want to be unwrapted at 360 degrees and even i tried the unwrap function i didnt get a result Thanks a lot in advance Dimitris
0 Comments
Accepted Answer
Star Strider
on 28 Jan 2015
Edited: Star Strider
on 28 Jan 2015
You actually want to wrap it, if I understand you correctly. You can use the mod or rem functions (choose a version) to wrap it:
phs = [0:10:1440]; % ‘Unwrapped’ phase
phwrap = @(adeg) mod(adeg, 360+1E-8); % Wrap Phase (mod)
phwrap = @(adeg) rem(adeg, 360+1E-8); % Wrap Phase (rem)
wphas = phwrap(phs);
figure(1) % Plot The Result
plot(phs, wphas)
grid
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!