通过Matlab中的数据点拟合指数曲线
问题描述:
有了指数衰减的数据,我想拟合一条曲线.如何在Matlab中做到这一点?
Having data of an exponential decay available, I would like to fit a curve through it. How can I do that in Matlab?
答
尝试一下:
ft=fittype('exp1');
cf=fit(time,data,ft)
这是当time
和data
是您的数据向量时;时间是自变量,数据是因变量.
This is when time
and data
are your data vectors; time is the independent variable and data is the dependent variable.
这将为您提供指数衰减曲线的系数.
This will give you the coefficients of the exponential decay curve.