what is the difference between "unwrap" and "phasez" function

2 次查看(过去 30 天)
Hello, I'm trying to analyze the phase response of S-parameter.
And there are 2 functions in Matlab in term of unwrapped phase, which are "unwrap" and "phasez".
When I plot three case below, it shows difference result.
test1 = angle(S21)*180/pi;
test2 = unwrap(angle(S21)*180/pi);
test3 = phasez(angle(S21)*180/pi);
I understood the how the "unwrap" function work. (It just make it flat.)
But, I couldn't get How the matlab create the "phasez" plot. And, I found out the "phasez" function make the matrix size to be 512*1. Is there specific reason for this?
In addition,in principle, the unwrapped phase need to start from 0 in DC.
But, the plot of test2 doesn't. So, that's also confusing.
Is there anyone to explain this question?

采纳的回答

Rachana Reddy Mamilla
Unwrap function is used to make the phase continuous and it’s not necessary for it to Start from 0.It depends on the input you give. phasez returns the n-point unwrapped phase response vector. If n is not defined ,It would consider the default value to be 512(which is an intermediate value using which one can hopefully get most of the information). If n is not defined , it would consider the default value to be 512 (which is an intermediate value using which one can hopefully get most of the information). For best results, set n to a value greater than the filter order. You can check this for more info.
  1 个评论
Nathan Jessurun
Nathan Jessurun 2018-12-10
Hi Rachana,
The answer you linked no longer exists. Would you mind updating the reference?
Also, I attempted to plot the phase with a greater n than the filter order in this example (https://www.mathworks.com/matlabcentral/answers/435035-how-does-phasez-work) but it didn't make any difference. Do you have any other suggestions?
Thanks!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Frequency Transformations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by