필터 지우기
필터 지우기

how to remove exponent notation after rfplot?

조회 수: 2 (최근 30일)
Alexander Pang
Alexander Pang 2017년 7월 12일
편집: Cristian Alistarh 2018년 7월 5일
It seems rfplot has a fixed format. I want to use GHz at x axis label and remove the exponent label/notation shown in right bottom of the pic.
My code: S1 = sparameters('xxx.s2p');
s1=rfplot(S1,2,1,'r');
ax=gca;
ax.FontSize = 18;
ax.XAxis.Exponent = 9;
ax.XAxis.Label.String = 'Frequency (GHz)';
ax.YAxis.Label.String = 'S21 (dB)';
  댓글 수: 1
KSSV
KSSV 2017년 7월 12일
ax.XAxis.Exponent = 9; I guess this is for the power 9...try changing this..

댓글을 달려면 로그인하십시오.

답변 (1개)

Cristian Alistarh
Cristian Alistarh 2018년 7월 5일
편집: Cristian Alistarh 2018년 7월 5일
Hi there,
I am not sure if you have solved this problem, but I think there is a simpler way. You can take:
S1 = sparameters('xxx.s2p');
my_return_loss = rfparam(S1,1,1); % note the 1,1 is for s11. choose the one you need (i.e.s21).
my_return_array_size = length(my_return_loss);
a = 20 % GHz
b = 50 % GHz
frequency_array = linspace(a,b,my_return_array_size);
plot(frequency_array,20*log10(my_return_loss));
ax=gca;
ax.FontSize = 18;
ax.XAxis.Label.String = 'Frequency (GHz)';
ax.YAxis.Label.String = 'S11 (dB)';
Hope this solves your problem.
All the best, Cristian

카테고리

Help CenterFile Exchange에서 Visualization and Data Export에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by