How can i unwrap the phase of my plot?
17 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Star Strider
2015 年 1 月 28 日
編集済み: Star Strider
2015 年 1 月 28 日
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 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!