MATLAB Answers

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

8 views (last 30 days)
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?

  0 Comments

Sign in to comment.

Accepted Answer

Maadhav Akula
Maadhav Akula on 30 Jun 2020
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!

  0 Comments

Sign in to comment.

More Answers (0)

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!