0
votes

I have a data set from an accelerometer sensor. it provides the acceleration value in each 20ms. Now I want to fit a curve to this data set then use Integral to get the speed of the object.

I want to use MATLAB curve fitting, however I don't know what fittype I should use. Is MATLAB able to fit curve for any arbitrary data set or I should isolate data set to different sets and fit curve for each one?

Thanks a lot

1
Since you don't know the kind of curve that best fit your data it's resonable to expect that you'll have to try many. I suggest that you have a look at the Curve Fitting App, by calling cftool. To my knowledge this is the fastest way of proceed.Jommy

1 Answers

0
votes

Since you don't know what function to use, you could try describing your curve with splines (smoothing splines, such as csaps could be useful).

However, it may be much easier to numerically integrate the data using e.g. CUMTRAPZ.