How to plot this equation?

1 Ansicht (letzte 30 Tage)
Haider al-kanan
Haider al-kanan am 6 Aug. 2015
Bearbeitet: Haider al-kanan am 24 Okt. 2020
How to plot this equation e parameters are known

Antworten (1)

Jannis Reich
Jannis Reich am 6 Aug. 2015
Hello Haider al-kanan,
My suggestion is that you write a function P_r(f).
function P_r_result=P_r(f)
R_s=1;
N_ST=10;
delta_f=.1;
k=[-N_ST/2:-1 1:N_ST/2];
for l=1:length(f)
P_r_result(l)=0;
for i=k
P_r_result(l)=P_r_result(l)+R_s*abs(W(f(l)-i*delta_f)).^2;
end
end
end
function W_result=W(f)
T_s=1;
T_TR=1;
W_result=T_s*sinc(T_s*f)*(cos(pi*T_TR*f))./(1-4*T_TR^2*f.^2).*exp(-1j*pi*T_s*f);
end
And then in simply specify your f-values:
f=-10:.1:10;
plot(f,P_r(f))
There may be more compact solutions, but I think this one does the job.

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by