Fit a curve, find an equation and then take Fourier Transform of the curve?

19 次查看(过去 30 天)
Hello everyone, I am working on some data, where I have to fit a curve and find an equation of the curve. This I can do it by simply using "Basic fitting tools" and then I have to take the Fourier Transform of the equation of the curve. Here is my data and equation I found by using basic fitting and then I can find Fourier Transform of the equation by using fft function but it will give in this form "51.5730 + 0.0000i ......".
y=[4 3 3 6 9 10 8 6 4];
x=1:length(y);
plot(x, y, 'rx', 'MarkerSize', 10);
I have two question: 1 - How can I get the equation for the given data without using basic fitting tools? 2 - I have to find the Fourier Transform of the equation and the answer should be in form of "A1*sin(wx)+A2*sin(2wx)+A3*sin(3wx)+....." where w=2*pi()/length(y)
Thanks in advance for helping

采纳的回答

Christiaan
Christiaan 2015-3-25
Dear Khuram,
What I think you need to do is not find the fourier transform of your function, but the fourier series of that function. (since you need to find a function of x) How this can be done is described in the documentation of Mathworks at this website.
Good luck! Christiaan

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Curve Fitting Toolbox 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by