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

12 vues (au cours des 30 derniers jours)
Khuram
Khuram le 25 Mar 2015
Commenté : Khuram le 5 Avr 2015
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

Réponse acceptée

Christiaan
Christiaan le 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

Plus de réponses (0)

Catégories

En savoir plus sur Curve Fitting Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by