views:

176

answers:

2

There's a toolbox function for the curve fitting toolbox called cftool that lets you fit curves to 1-d data. Is there anything for 2-d data?

+2  A: 

You seem to be looking for griddata. You might also want to look at gridfit.

Jerry Coffin
+4  A: 

Jerry suggested two very good choices. There are other options though, if you want a more formulaic form for the model.

The curvefitting toolbox, in the current version, allows you to fit surfaces to data, not just curves.

Or fit a 2-d polynomial model, using a tool like polyfitn.

Or you can use a nonlinear regression, if you have a model in mind. The optimization toolbox will help you there, with lsqnonlin or lsqcurvefit, either of which can fit 2-d (or higher) models. Or, if you have the stats toolbox, then try nlinfit.

Perhaps you might like a tool to fit Radial Basis Functions.

Neural nets are another way to fit data, so use the Neural Network Toolbox

So there are many ways to model surfaces, depending on your interests, your knowledge of a likely form for the model, what toolboxes you have or what you might choose to download. A very big factor in your model choice are your goals for the model. What will you do with it? How will it be used?

woodchips

related questions