We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
fzero
并非微不足道。如果您的函数是多项式,请尝试 GSL http://www.gnu.org/software/gsl/
fzero
is non trivial.If your function is polynomial, try GSL http://www.gnu.org/software/gsl/
尝试查看 GNU Octave。它是 MATLAB 的 FLOSS 替代品,并且具有许多相同的功能。看一下它的
fzero
实现,记住该代码是 GPL 的。Try looking at GNU Octave. It's a FLOSS alternative to MATLAB and has a lot of the same functionality. Take a look at its implementation of
fzero
, keeping in mind that the code is GPL'ed.我在 C++ 中为科学和工程应用做了很多工作。我最喜欢的参考文献之一是 Numerical Recipes nr.com。这本书的一些旧版本包含看起来像 Fortran 的代码,但是用 C 编写的,例如数组的索引从 1 开始。2007 年的最新版本(仅 C++ 第 3 版)纠正了许多抱怨,例如 1 索引数组和混乱的命名空间。即使您不喜欢这些代码,简单的数学解释也使这本书值得购买。请注意,有些人认为代码的许可很严格,但与 Matlab 相比,这是一个巨大的飞跃。其他值得尝试的东西是 GSL 和 Intel Math Kernel Lib。祝你好运。
I do a lot of work in C++ for science and engineering applications. One of my favorite references is Numerical Recipes nr.com. Some of the older versions of the book included code that looked like Fortran but was written in C, for example indexes of arrays started at 1. The latest version from 2007 (C++ only 3rd edition) corrected many of the complaints like 1 indexed arrays and confusing namespace. Even if you don’t like the code the simple explanations of the math make the book worth buying. Be warned some people consider the license for the code harsh but compared to Matlab it is a giant leap forward. Other things to try is GSL and Intel Math Kernel Lib. Good luck.
查看嵌入式 matlab 子集。它允许您将 matlab 脚本转换为 C 代码。我用它从 matlab 函数中创建库,并将其链接到 C++ 项目。它仅支持函数的子集,但 fzero 包含在列表中但有一些限制。 。 。
http://www.mathworks.com/help/toolbox/eml /ug/bq1h2z7-9.html
这使您可以在温暖舒适的 Matlab 环境中完成所有算法开发。 Matlab 甚至会构建 C 库。您所要做的就是链接到它。如果您已经熟悉 Matlab,这比学习一堆 C++ 数值库方式容易。
Check out the embedded matlab subset. It allows you to convert matlab scripts into C code. I use it to make libraries out of matlab functions which I link to form C++ projects. It only supports a subset of functions, but fzero is included in the list with some limitations . . .
http://www.mathworks.com/help/toolbox/eml/ug/bq1h2z7-9.html
This allows you to do all of your algorithmic development in the warm and cozy Matlab environment. Matlab will even build the C library. All you have to do is link to it. This is WAY easier than learning a bunch of C++ numerical libraries if you're already familiar with Matlab.
我不认为它包含 fzero 等效项,但 Armadillo 确实有许多 C++ 版本的 MATLAB 函数(在某些情况下可能会这样做)。例如,请参阅此转换表。
I don't think it contains an fzero equivalent, but Armadillo does have many C++ versions of MATLAB functions (so may do for some instances). See, for example, this conversion table.