Code covered by the BSD License  

Highlights from
Two Dimensional Surface Fitting Program

5.0

5.0 | 1 rating Rate this file 15 Downloads (last 30 days) File Size: 43.98 KB File ID: #26336

Two Dimensional Surface Fitting Program

by aasim Azooz

 

10 Jan 2010

A two dimensional surface fitting program

| Watch this File

File Information
Description

This program represents a further development of the standard powerful “nlinfit” facility already in matlab. The major problem with “nlinfit” is that it can only handle fitting of one dimensional arrays (x, y) where x is the independent variable and y is the dependent one.
The program fit2 uses another program “fitfit” where the user fitting function can be defined. This user defined function is defined in line 6 of fitfit as ff in terms of a,x,y.

The input arguments to the program are
 1- a which is an array representing the starting values of the free
    fitting parameters ( similar to that when nlinfit is used)
   The length of a must be equal to the number of parameters used in the user
    defined function to be fitted (line 6 in the M-file "fitfit"
 2- x and y are each a one dimensional array representing the independent
    variables
 3- z is the dependent variable matrix whose elements are functions of the
    meshgrid values of x and y
 please read the pdf file for more information and example

Required Products Curve Fitting Toolbox
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
09 Sep 2010 Kyaw Zin Latt

beautiful work... thanks...
I am fitting for Gaussian 2D. I am working to get error bar (COVB) from this program. If someone have that, please add comment here... Thanks..

For my version, R2009a (following needed to be changed)
mat=ver2mat(a,i); to j=length(a)/i; mat=reshape(z,i,j);

psurface(x,y,z); to 'surf' or anything you prefer

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
optimization aasim Azooz 11 Jan 2010 11:18:31
mathematics aasim Azooz 11 Jan 2010 11:18:31
measurement aasim Azooz 11 Jan 2010 11:18:31
2d Kyaw Zin Latt 09 Sep 2010 15:12:08

Contact us at files@mathworks.com