MATLAB: Curve Fitting Techniques

curve fittingleast squares

Hello everyone,
I have a project I'm working on which requires that I search a 3-parameter parameter space for a best fit curve. Unfortunately, the curve cannot be described by an explicit function. To generate the best fit, the process I have been using involves varying the 3 parameters, generating a test curve from the parameters, subtracting my experimental data, and then performing an RMS function to search for the lowest RMS value.
I'm wondering if there is any better way to do this, since my current method is a "brute force" method, where I search large sections of parameter space. This ends up taking hours to finish solving (reaching a stable minimum for RMS). For example, I know there is a built in least squares fit in MATLAB, but it requires that you provide a function with a Jacobian. Is there any similar process for non-explicit functions?

Best Answer

fminsearch (and functions that use fminsearch such as John d'Errico's fminsearchbnd, and others on the file exchange) does not need explicit derivatives. As long as you can calculate the curve from your parameters you should be able to run a least-square-type minimization with those tools.
HTH