Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

simplifly polynomial expression

Status
Not open for further replies.

thefantasticme

Automotive
Mar 22, 2006
7
Hi

i would like to know if there is any function that can be used to reduce the size of polynomial expression (i have a huge one, with several terms and i must made an approximation because my computer can not finish the calculus once i use it in a function)

gabi
 
Replies continue below

Recommended for you

Why can you just curve fit it to a lower order polynomial?

TTFN



 
how can i make what you say? In fact i dont really understand what you want to say....
gabi
 
Use your function to calculate a set of points {(xi,yi)} in the range of interest.

Assume a form of the solution with unknown parameters. For example Yhat(X)=A + B*X + C*X^2 with unknown parameters A,B,C. Then to find the values of unknown parameters that minimize the sum of squares of the residuals. Residuals are Ri=Yhati = Yi

In Matlab you can make Matlab do all the programming - use the polyfit function to find a polynomial fit.

If you don't want a polynomial fit, you can program a least squares fit for any functional form using simple matrix algebra. (It may be tough to figure out yourself, search around and you should be able to locate the algorithm or if you really want I can dscribe it).

Also excel has a variety of ways to fit functions which might even be easier. Drop on over to the spreadsheet forum.

=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
Correction:
Residuals are Ri=Yhati -Yi


=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
If you are not satisfied with a polynomial fit (Matlab polyfit), then you can program your own least square estimate using the techniques shown in chapter 15 here:



=====================================
Eng-tips forums: The best place on the web for engineering discussions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor