what is the difference between "unwrap" and "phasez" function
12 次查看(过去 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);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/194064/image.png)
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?
0 个评论
采纳的回答
Rachana Reddy Mamilla
2018-8-30
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
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 Center 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!