Hello,
I am trying to write a MATLAB routine that will plot the frequency response of a circuit based on the circuits impulse response.
For starters, I am using a simple RC low pass filter with values of R=1kΩ and C=1μF. The transfer function will be:
(1/RC)/(s+(1/RC)) or 1000/(s+1000).
The commands I am using are:
num=[1000];
den=[1 1000];
Hs=tf(num,den);
ImpRes=impulse(Hs);
MagFFT=abs(fft(ImpRes));
plot(MagFFT);
I am confident up until the plot of the magnitude of the fft. Any ideas?
I am trying to write a MATLAB routine that will plot the frequency response of a circuit based on the circuits impulse response.
For starters, I am using a simple RC low pass filter with values of R=1kΩ and C=1μF. The transfer function will be:
(1/RC)/(s+(1/RC)) or 1000/(s+1000).
The commands I am using are:
num=[1000];
den=[1 1000];
Hs=tf(num,den);
ImpRes=impulse(Hs);
MagFFT=abs(fft(ImpRes));
plot(MagFFT);
I am confident up until the plot of the magnitude of the fft. Any ideas?