Matlab 中时间尺度的最小二乘拟合例程
我想知道Matlab中是否有最小二乘例程可以将模板信号及时缩放为测量信号。假设我的模板是大约的信号。 1秒,但测量中对应的部分是1.2秒。现在我也想将我的模板调整为 1.2 秒长。当然,可以简单地分几个步骤重新调整模板,与每个步骤的信号互相关并找到最大值。然而,这会大大减慢我的程序速度。 Matlab的lsqcurvefit需要两个长度相等的向量,而其中一个向量的长度正是我想要改变的。 有人有想法吗? 谢谢!
I would like to know if there is a least squares routine in Matlab to scale a template signal to a measured signal in time. Let's say my template is a signal of approx. 1 second, but the corresponding part in the measurement is 1.2 seconds. Now I want to scale my template to be 1.2 seconds long as well. Of course it is possible to simply rescale the template in several steps, cross-correlate with the signal for each step and find the maximum. This however would slow down my programme drastically.
Matlab's lsqcurvefit needs two vectors of equal length, and the length of one of the vectors is exactly what I want to vary.
Does anyone have an idea?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否真正尝试过简单的
fminsearch
函数方法?它可能没有你想象的那么慢。例如(未经测试 - 仅用于说明)
您可能需要调整限制等!
如果不适合,您还可以查看 CPM 工具箱(尽管它可能过于复杂,无法满足您的需求)
http://www.cs.toronto.edu/~jenn/alignmentStudy/
Have you actually tried the simple
fminsearch
function approach? It might not be as slow as you think.e.g. (untested - just for illustration)
you'll probably need to tweak the limits etc!
It it doesn't suit, you could also look at the CPM toolbox (though it may be too sophisticated for your needs)
http://www.cs.toronto.edu/~jenn/alignmentStudy/