How to plot this equation?

1 visualización (últimos 30 días)
Haider al-kanan
Haider al-kanan el 6 de Ag. de 2015
Editada: Haider al-kanan el 24 de Oct. de 2020
How to plot this equation e parameters are known

Respuestas (1)

Jannis Reich
Jannis Reich el 6 de Ag. de 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.

Categorías

Más información sobre Guidance, Navigation, and Control (GNC) en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by