Matlab函数"fit"是否有等效的GNU Octave? [英] Is there a GNU Octave equivalent for the Matlab function "fit"?

查看:132
本文介绍了Matlab函数"fit"是否有等效的GNU Octave?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在信号分析课程中的老师给了我一些Matlab代码,我必须执行这些代码才能完成家庭作业.我一直在使用GNU Octave时没有遇到麻烦,但是这次有一条命令令我头疼.

My teacher in the signal analysis course has given me some Matlab code that I have to execute in order to complete a home assignment. I have always been using GNU Octave without troubles, but this time there is this command that is giving me headaches.

[c8,g8]=fit(time, sin_4_harmonic,’fourier8’)

我在GNU Octave中找不到函数"fit",在以下URL中为Matlab引用了该函数:

I cannot find the function "fit" in GNU Octave, which is referenced for Matlab at the following url http://www.mathworks.se/help/curvefit/fit.html

有人知道我应该加载哪个软件包吗?或者是否有任何等同的软件包?

Does anyone knows which package should I load, or if there is any equivalent?

谢谢=)

推荐答案

据我所知,该功能在任何Octave软件包中均不存在.但是,查找类似内容的最佳位置是 optim软件包,可能是该函数 nonlin_curvefit .查看文档,模型fourier8的类型为Y = a0+a1*cos(x*p)+b1*sin(x*p)... +a8*cos(8*x*p)+b8*sin(8*x*p).

As far as I know, that function is not present in any of the Octave packages. However, the best place to look for something similar would be the optim package, probably the function nonlin_curvefit. Looking at the documentation, the model fourier8 is of the type Y = a0+a1*cos(x*p)+b1*sin(x*p)... +a8*cos(8*x*p)+b8*sin(8*x*p).

这篇关于Matlab函数"fit"是否有等效的GNU Octave?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆