How can i unwrap the phase of my plot?

16 visualizaciones (últimos 30 días)
Mitsos
Mitsos el 28 de En. de 2015
Editada: Star Strider el 28 de En. de 2015
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

Respuesta aceptada

Star Strider
Star Strider el 28 de En. de 2015
Editada: Star Strider el 28 de En. de 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
If you want to ‘unwrap’ it, use the built-in MATLAB unwrap function.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by