|
Hello. I'd like to use the curve fit toolbox's robust regression methods for nonlinear fitting.
However, I also want to modify my cost function to minimize the distance between the datapoints and and the average value of the model curve over a time period, rather than the taking the value of the model at the corresponding timepoint. So if I have a data point at t=5 representing the first 10 minutes of data, I want to compare the datapoint and the average value of the fit curve over 0-10 minutes, not the value of the fit curve at t=5. (so I'd just integrate the curve and divide by the domain)
Can I do this with the curvefit toolbox? I can't see where I would make a custom cost function.
|