Archived

This topic is now archived and is closed to further replies.

Rex_Chaos

Fourier transformation

Recommended Posts

Hello all, I used the matlab to do the fourier transformation, but I found the result (the plotting of the spectrum space) is different from what the textbook tells us. t=[0:100]; for time series f1=50; f2=100; for two frequences f=linspace(-f2, f2, length(t)); for frequence series y=sin(2*pi*f1*t) + sin(2*pi*f2*t); because y comes from the combination of two-different-frequence sin function, so the specturm of y should only have two point (f1 and f2) are non-zero. yy=fft(y); plot(f, yy); we should get a plotting like ^ | | | | | | | |________________>f 0 f1 f2 but unforunately, what I get is a continuous curve somewhat nlike a random noise. Please help! Rex

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It is not obvious how you are using this in a game, and it looks more complex than you need for any game simulation. If you can provide some details of what this is being used for there is probably a better solution using more straightforward maths.

Share this post


Link to post
Share on other sites
Yeah, I''m closing this topic. The fact that the question even included the phrase "result [...] is different from what the textbook tells us" makes it certain that this is related to a homework assignment. Read the forum FAQ. Its time to collaborate with students at your school or your teacher/professor.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.