ahmet nurlu
ahmet nurlu

Reputation: 31

fitting two dimensional curves in matlab

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?

Upvotes: 3

Views: 5268

Answers (2)

user85109
user85109

Reputation:

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?

Upvotes: 7

Jerry Coffin
Jerry Coffin

Reputation: 490128

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

Upvotes: 3

Related Questions