Feb 13, 2006 #1 M MATLAB Newbie level 1 Joined Feb 13, 2006 Messages 1 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,288 Hi! I have a question on MATLAB as follows: The signal x(t) = sin(ω1t) , given ω1 = 5 , is sampled at 7 samples/sec during8 sec. Compute the power spectrum for the sampled signal. Can any body help me with that? thanks
Hi! I have a question on MATLAB as follows: The signal x(t) = sin(ω1t) , given ω1 = 5 , is sampled at 7 samples/sec during8 sec. Compute the power spectrum for the sampled signal. Can any body help me with that? thanks
Feb 14, 2006 #2 hr_rezaee Advanced Member level 3 Joined Oct 6, 2004 Messages 747 Helped 109 Reputation 218 Reaction score 24 Trophy points 1,298 Location Iran-Mashhad Activity points 4,025 Question on MATLAB hi see fft() help. it is useful.
Feb 15, 2006 #3 C claudiocamera Full Member level 4 Joined Aug 19, 2005 Messages 224 Helped 27 Reputation 54 Reaction score 6 Trophy points 1,298 Location Salvador-BA-Brazil Activity points 4,282 Question on MATLAB Unless some adjustment in frequency axis, you can start trying the code below. >> w1=5; >> t=0:1/7:8; >> ws=7; >> x=sin(w1*t); >> Xw=abs(fftshift(fft(x))); >> Ws=[-28:28]*ws; >> plot(Ws,Xw)
Question on MATLAB Unless some adjustment in frequency axis, you can start trying the code below. >> w1=5; >> t=0:1/7:8; >> ws=7; >> x=sin(w1*t); >> Xw=abs(fftshift(fft(x))); >> Ws=[-28:28]*ws; >> plot(Ws,Xw)
Mar 8, 2006 #4 S shirzadi Newbie level 4 Joined Dec 20, 2005 Messages 7 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,342 Re: Question on MATLAB correct Matlab Code is: >> w1=5; >> t=0:1/7:8; >> ws=7; >> x=sin(2*pi*w1*t); >> Xw=abs(fftshift(fft(x))); >> Ws=[-28:28]*ws; >> plot(Ws,Xw)
Re: Question on MATLAB correct Matlab Code is: >> w1=5; >> t=0:1/7:8; >> ws=7; >> x=sin(2*pi*w1*t); >> Xw=abs(fftshift(fft(x))); >> Ws=[-28:28]*ws; >> plot(Ws,Xw)