# MATLAB Curve fitting using Matlab

#### rain2359

hi,

I am trying to do a curve fitting for a waveform obtained from the division of 2 FFT data. So, I used invfreqz in Matlab so that I can obtain the transfer function of the waveform, and at the same time, find an estimated waveform for the curve obtained. However, I cant seem to do it using this method, even though I had used the varience as the wt of the invfreqz. May I know does anyone knows what went wrong? Really appreaciate any help given. Thanks.

wt(1:k)=0.0002;
wt(1:405)=1;
ff = f1(1:(k));
f_norm = ff / f1(k)*pi;
[num,den]=invfreqz(tf1(1:k), f_norm,3,4,wt)
[h2,w2] = freqz(num,den,k);

Related Math Software Workshop News on Phys.org

"Curve fitting using Matlab"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving