简体   繁体   English

适用于任意数据集的MATLAB曲线拟合

[英]MATLAB curve fitting for an arbitrary data set

I have a data set from an accelerometer sensor. 我有一个来自加速度传感器的数据集。 it provides the acceleration value in each 20ms. 它提供每20ms的加速度值。 Now I want to fit a curve to this data set then use Integral to get the speed of the object. 现在,我想将曲线拟合到该数据集,然后使用Integral来获取对象的速度。

I want to use MATLAB curve fitting, however I don't know what fittype I should use. 我想使用MATLAB曲线拟合,但是我不知道应该使用哪种fittype。 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? MATLAB是否能够对任意数据集拟合曲线,或者我应该将数据集隔离到不同的集合并为每个数据拟合曲线?

Thanks a lot 非常感谢

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). 由于您不知道要使用什么功能,因此可以尝试使用样条线描述曲线(使样条线平滑,例如csaps很有用)。

However, it may be much easier to numerically integrate the data using eg CUMTRAPZ . 但是,使用例如CUMTRAPZ对数据进行数值积分可能会容易得多

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM