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

11 views (last 30 days)
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

Accepted Answer

Christiaan
Christiaan on 25 Mar 2015
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

More Answers (0)

Categories

Find more on Curve Fitting Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!