Hey guys .. I'm new with Matlab , and I have to submit the homework to my instructor due tomorrow so I need your help please!
I want to know what's wrong with this code .. it doesn't give an error message but the figure window doesn't show the graph !
it's for finding the magnitude and phase response for this function
y=(10 sin (100t)) / (2 pi t)
fs=70000;
t=0:1/fs:0.5;
Y=(5*sin(700*t))/(pi*t);
N=length(Y);
Yf=fft(Y);
Ym=abs(Yf);
Ym=Ym(1:N/2);
Yp=angle(Yf);
F=(0:N/2-1)*(fs/N);
plot(F,Ym);
xlabel('Frequency in HZ');
Ylabel('Amplitude');
title('Frequency response for sin wave');
I want to know what's wrong with this code .. it doesn't give an error message but the figure window doesn't show the graph !
it's for finding the magnitude and phase response for this function
y=(10 sin (100t)) / (2 pi t)
fs=70000;
t=0:1/fs:0.5;
Y=(5*sin(700*t))/(pi*t);
N=length(Y);
Yf=fft(Y);
Ym=abs(Yf);
Ym=Ym(1:N/2);
Yp=angle(Yf);
F=(0:N/2-1)*(fs/N);
plot(F,Ym);
xlabel('Frequency in HZ');
Ylabel('Amplitude');
title('Frequency response for sin wave');