Hi,
I have some data which is stored as three matrices, X, Y, and Z.
I want to find a function that fits the data.
That is somthing like F(X,Y) = Z.
Does Matlab have any toolbox or function for this?
Thanks.
Rock
|
|
0
|
|
|
|
Reply
|
Rock
|
2/10/2011 1:52:03 PM |
|
"Rock" <by0390742001@yahoo.com.tw> wrote in message
news:ij0qi3$1nb$1@fred.mathworks.com...
> Hi, I have some data which is stored as three matrices, X, Y, and Z.
> I want to find a function that fits the data.
> That is somthing like F(X,Y) = Z.
> Does Matlab have any toolbox or function for this?
> Thanks.
Look at the LSQCURVEFIT function in Optimization Toolbox, the Curve Fitting
Toolbox, and/or the regression functions in Statistics Toolbox to name a
few.
This section from the documentation for MATLAB may also be of interest to
you.
http://www.mathworks.com/help/techdoc/data_analysis/f1-6010.html
--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
|
|
0
|
|
|
|
Reply
|
slord (13267)
|
2/10/2011 2:18:09 PM
|
|
Hi Rock
> Look at the LSQCURVEFIT function in Optimization Toolbox, the Curve
> Fitting Toolbox, and/or the regression functions in Statistics Toolbox to
> name a few.
>
> This section from the documentation for MATLAB may also be of interest to
> you.
>
> http://www.mathworks.com/help/techdoc/data_analysis/f1-6010.html
Two of the techniques that Steve recommended assume that you can specify a
specific function that best describes that relationship between your
variables.
For example, if your using regression analysis you'll need to assume that
the relationship between your variables is best modeled as a surface or a
hyperbolic paraboloid or whatever. You can then use regression analysis to
identify a set of parameters for this surface that best explains your data
set.
In a lot of cases, this assumption isn't true. The only thing that you have
to work with is three vectors of data. You can't specify precisely what
type of function you should use for your regression. The following blog
posting provides some example code showing how you can use a combination of
Localized Regression
Cross Validation
Bootstrap
to solve this type of problem
http://blogs.mathworks.com/loren/2011/01/13/data-driven-fitting/
The example that I use in the blog shows a curve fitting problem rather than
surface fitting, but its pretty easy to modify the code to turn this into a
surface fitting example...
|
|
0
|
|
|
|
Reply
|
Richard_Willey
|
2/10/2011 3:35:49 PM
|
|
Thanks both of your help!
Now, I know how to use the fitting GUI tool(sftool) to find the model.
One thing I want to mention is that I got confused when I read the Matlab document about sftool.
It says that input(X input, ..., etc) can be in the form of matrix.
If you want to import a matrix in the workspace, you can't find it in the selected list.
Finally, I figured out that the input should be in the form of vector.
Hope this information is helpful.
Rock
|
|
0
|
|
|
|
Reply
|
by0390742001 (2)
|
2/15/2011 4:30:08 PM
|
|
|
3 Replies
367 Views
(page loaded in 0.07 seconds)
Similiar Articles: Model a function fitting the data - comp.soft-sys.matlab ...Hi, I have some data which is stored as three matrices, X, Y, and Z. I want to find a function that fits the data. That is somthing like F(X,Y) = ... How to use Weibull model to fit curve from data - comp.soft-sys ...How to use MODEL FUNCTION??? - comp.soft-sys.matlab How to use Weibull model to fit curve from data - comp.soft-sys ... Model a function fitting the data - comp.soft-sys ... Using matlab to do modelling and curve fitting using Data from ...Sine Curve Fit to Data - comp.soft-sys.matlab Simple linear ... SLOPE function - Excel ... for a biexponential model, biexp(), and a two phase linear ... fitting with the custom model without using CurveFittingToolbox ...Dear All, I am trying to define a custom fit model and fit to the data. ... Complex value computed by model function, fitting cannot continue. > > Try using or ... How to use MODEL FUNCTION??? - comp.soft-sys.matlabModel a function fitting the data - comp.soft-sys.matlab ... How to use MODEL FUNCTION??? - comp.soft-sys.matlab How to use Weibull model to fit curve from data - comp ... Gaussian Mixture Model Fitting to PDF or Histogram - comp.soft-sys ...... it would be better if you could get the original data, but here's an illustration of fitting a function ... Gaussian Mixture Model Fitting to PDF or Histogram - comp.soft ... Comput Geometry : Fit a step function to set of x,y data - comp ...Model a function fitting the data Follow - Computer Group I ... what you do about your data and your goals for the model, it ... Comput Geometry : Fit a step function to ... 2nd-order surface equation for fitting 3d data - comp.soft-sys ...I already used the well-known lsplane.m function to fit the data into ... for wsn coverage strategy using grid-based model ... 2nd-order surface equation for fitting 3d data ... curve fitting with nlinfit - comp.soft-sys.matlabModel a function fitting the data - comp.soft-sys.matlab ... curve fitting with nlinfit - comp.soft-sys.matlab Gaussian Mixture Model Fitting to PDF or Histogram ... lsqcurvefit and Simulink - comp.soft-sys.matlabTill now, I did my data fitting for a known function. But right now, I want to step forward and instead of using a known equation, I want to use a Simulink model. Fit curve or surface to data - MATLAB - MathWorks - MATLAB and ...Description. fitobject = fit(x,y,fitType) fits the data in x and y with the library model, anonymous function or fittype object specified by fitType. Regression: Fitting Functions to DataWe have often seen algebraically defined functions used to model relationships between variables. For example, a demand function expresses the demand for an item as a ... 7/26/2012 5:28:12 AM
|