Least square polynomial fit
Ältere Kommentare anzeigen
I have two arrays x(i) ,y(i). I need to do a least square polynomial fitting for y(i). After the polynomial fit is done, I need to find the maximum of y(i), say y(n) and then corresponding to that find the value of x(n). Can you please suggest, how shall I proceed? What are the math functions involved?
Akzeptierte Antwort
Weitere Antworten (1)
Dr. Seis
am 21 Jan. 2012
0 Stimmen
Check out "polyfit", "polyval" and "max"
- polyfit will give you the polynomial coefficients for an n-order polynomial
- polyval will give you new y-values when you supply it new x-values and the polynomial coefficients found in polyfit
- max will give you the max value associated with you new y-values, it can also supply you the index of the max value so you can determine its corresponding value from your new x-values
Kategorien
Mehr zu Polynomials finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!