logo

Article | SIGNALS AND SYSTEMS

   

Added on  2022-10-04

9 Pages394 Words10 Views
 | 
 | 
 | 
Running head: SIGNALS AND SYSTEMS
SIGNALS AND SYSTEMS
Name of the Student
Name of the University
Author Note
Article | SIGNALS AND SYSTEMS_1

SIGNALS AND SYSTEMS1
The Fourier transform of discrete signal is obtained by the fft function in MATLAB. The fft
of any discrete signal x(n) is represented by,
X(k+1) =
n =0
N1
x ( n+ 1 ) W N
kn
Where, X(k+1) is the signal after performing Fourier transform.
Where,
W N =e
j 2 π
N
MATLAB code for DFT:
data = xlsread('data.xlsx');
t = data(:,1);
signal = data(:,2);
figure(1)
plot(t,signal)
title('blood flow signal')
ylabel('signal amplitude')
xlabel('time t in secs')
dftsig = fft(signal); amp = abs(dftsig);
phase = angle(dftsig);
df = 1/(t(2)-t(1));
Article | SIGNALS AND SYSTEMS_2

SIGNALS AND SYSTEMS2
freq = ((t(1):length(dftsig)-1)*df)/length(dftsig);
figure(2)
subplot(2,1,1)
plot(freq,amp)
xlabel('Frequencies of sinusoids')
ylabel('Amplitude of sinusoids in kg/h')
ax= gca;
ax.XTick = [0,1,2,3,4,5];
title('Amplitudes vs frequency')
subplot(2,1,2)
plot(freq,phase*180/pi)
xlabel('Frequencies of sinusoids')
ylabel('Phase of sinusoids in degrees')
ax= gca;
ax.XTick = [0,1,2,3,4,5];
title('Phase vs frequency')
Article | SIGNALS AND SYSTEMS_3

End of preview

Want to access all the pages? Upload your documents or become a member.