File Exchange

image thumbnail

Least square curve fit with out differentiation(Gra​mdeterminant method)

version (2.59 KB) by Mathan Chandran
Give the basis functions and get the desired curve.

1 Download

Updated 13 Dec 2009

View License

Curdat.m is a data file. You can change to get your
Polycurve.m is polynomial basis file.
Graf.m is the user’s basis file. You can change to
match your choice.
Curfit.m Gives the polynomial curve and the graph.
Gramplot.m gives the curve for selected basis.

Example ;
Gramplot() gives the result. Deviations and
locations are included.
Curfit(4) gives the result.

Least square curve fit is the principle. In the formulation,
differentiation is avoided. Instead,an inner-product is
designed and Gram-matrix is created. The curve F is

F = ∑ ai fi ; i = 1..n

ai are the parameters
fi are the basis functions

Cite As

Mathan Chandran (2021). Least square curve fit with out differentiation(Gramdeterminant method) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

John D'Errico

Sigh. 5 different functions, absolutely no help. All to do something amazingly simple (i.e., something that should take essentially ONE line in matlab.) Lots of loops. Uses the matrix inverse, instead of backslash. A hard coded model, so you need to edit this to change the model, IF you can find where to put it.

MATLAB Release Compatibility
Created with R2009b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!