How to plot this equation?

1 visualizzazione (ultimi 30 giorni)
Haider al-kanan
Haider al-kanan il 6 Ago 2015
Modificato: Haider al-kanan il 24 Ott 2020
How to plot this equation e parameters are known

Risposte (1)

Jannis Reich
Jannis Reich il 6 Ago 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.

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by