How to plot this equation?

1 view (last 30 days)
Haider al-kanan
Haider al-kanan on 6 Aug 2015
Edited: Haider al-kanan on 24 Oct 2020
How to plot this equation e parameters are known

Answers (1)

Jannis Reich
Jannis Reich on 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.

Categories

Find more on Guidance, Navigation, and Control (GNC) in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!