How to wrap angle in degrees to [-180 180] using rfplot(S_params, 'angle')?

25 次查看(过去 30 天)
When I use function rfplot(S_params, 'angle'), the values of phase are unlimited. But I need the phase values to be between [-180:180] degrees. How can I do that?

采纳的回答

Maadhav Akula
Maadhav Akula 2020-6-30
Hi, you can have a look at the following to wrap the angles between the interval [-180:180]
Sa = sparameters('default.s2p');
data = rfparam(Sa,1,1);
rfplot(Sa,1,1,'angle')
func1 = @(x)180*angle(x)/pi;
figure; plot(Sa.Frequencies,func1(data))
Hope this helps!
  1 个评论
Marco Pilati
Marco Pilati 2023-4-17
Hello,
is this necessary since the rfplot function do not perform the angle wrap when asked to output the angle of the complex number inside the s-parameter oblject. Isn't it something that should be fixed or added as an option?
Thanks

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Spline Postprocessing 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by