0% found this document useful (0 votes)
5 views1 page

Spectral Analysis of Signal Components

This document contains code to analyze the spectral components of a signal composed of three sinusoids with frequencies of 50Hz, 400Hz, and 100Hz. The code applies a fast Fourier transform (FFT) to the signal, computes the power spectrum, and plots it to identify the three dominant frequencies in the original signal.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Spectral Analysis of Signal Components

This document contains code to analyze the spectral components of a signal composed of three sinusoids with frequencies of 50Hz, 400Hz, and 100Hz. The code applies a fast Fourier transform (FFT) to the signal, computes the power spectrum, and plots it to identify the three dominant frequencies in the original signal.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Exp 6 -To find spectral component of signal

t=0:0.001:0.6;
x=sin(2*pi*50*t)+sin(2*pi*400*t)+sin(2*pi*100*t);
y=x+randn(size(t))
figure();
plot(100*t(1:50),y(1:50))
z=fft(y,512);
P=z.*conj(z)/512;
f=1000*(0:256)/512;
figure();
plot(f,P(1:257));
Output4
3
2
1
0
-1
-2
-3
-4

0.5

1.5

2.5

3.5

4.5

400

450

500

120

100

80

60

40

20

50

100

150

200

250

300

350

You might also like