Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

can somebody trace my error in solution of freq spectrum

Status
Not open for further replies.

moonnightingale

Full Member level 6
Joined
Sep 17, 2009
Messages
362
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Activity points
3,832
I have found the frequency spectrum of signal x=(4+cos(1000*pi*t+pi/3)).*(sin(500*pi*t+pi/4))

There is slight difference in my hand calculation amplitude and amplitude by Matlab. By me, the amplitude at 250 Hz is 2 and by Matlab it is 1.8

My solution is attached here



The matlab code is here

Fs = 2000;
t = 0:1/Fs:1-(1/Fs);
x=(4+cos(1000*pi*t+pi/3)).*(sin(500*pi*t+pi/4));
%x=(4+cos(40*pi*t)).*(cos(200*pi*t-pi/2));
%x=cos(pi*t).*(sin(10*pi*t));
xdft = (1/length(x))*fft(x);
freq = -1000:(Fs/length(x)):1000-(Fs/length(x));
plot(freq,abs(fftshift(xdft)))
xlabel('Freq(Hz)-------->')
ylabel('Amplitude')
Kindly tell me abt my error

and more thing, if at two points, we have freq component, what happen to them, are they added or the lower one is merged in it
 

Attachments

  • answer.JPG
    answer.JPG
    717.9 KB · Views: 99

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top