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

조회 수: 14 (최근 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