What you want to do is termed ‘parameter estimation’. There are several MATLAB functions in various toolboxes that will do that, for example the Optimization Toolbox function lsqcurvefit, Statistics Toolbox nlinfit, and the Curve Fitting Toolbox.
That you want to estimate 25 parameters, even with 501 data pairs, may be difficult. The most important aspect to consider is that the ‘best’ solution is highly dependent on your choice of initial parameter estimates (starting values). I would do exploratory analyses with much simpler functions (with much fewer parameters) to get an idea of the parameter range that will likely be most successful. The problem with a large parameter set is that you are likely to encounter many local minima (false solutions) before you find the global minimum (best solution). The best solution is the solution with the lowest residual error.
Depending on the form of your objective function (the function you want to fit to your data), a unique set of estimated parameters may not be possible.
This is a complex topic, and I suggest you do some research on ‘nonlinear parameter estimation’ before you begin your project. While you can simply give data and your objective function to the nonlinear parameter estimation routines in MATLAB, if you have no idea how they work and the theoretical basis of nonlinear parameter estimation, this could become a very frustrating experience for you.
Best Answer