Matlab 对比Maple 用于对数据进行曲线拟合,找到曲线方程,然后通过代码进行积分
我确信关于 Maple 与 Matlab 的帖子有上千篇,但我有一些独特的要求,在我开始学习这两者中的一个之前,我想知道哪一个最适合。
我有一组来自记录撞击的加速度计的数据。我需要执行以下操作:
- 将曲线拟合到数据
- 查找该曲线的方程
- 求解链接中列出的方程 http://upload.wikimedia.org/wikipedia/en/math/2/d/3/2d39556df1dbbd467dc914253e93cdb0.png 它求解一系列曲线,即区间下的最大值。
我希望尽可能与 Visual Studio 无缝地完成此操作。 GUI 和应用程序的所有其他元素都是用 VB 构建的,我想保留它。我知道maple有一个代码生成部分,可以转换为VB,它能够处理这样的事情吗? Matlab 与 Visual Studio 集成得很好吗?如果有一个对象可以放在 VB 窗体上,以促进与 matlab 或 maple 框架之间的通信,我会很兴奋。目前我让它与 R 一起工作,但是要做到这一点,我需要将数据写入文件,启动 R 脚本,等待它完成,将控制权返回到我的 VB 应用程序并从那里获取它。这个过程花费的时间太长,而且由于我没有多线程编程的经验,当控制权传递给脚本时,GUI 会冻结。
任何帮助或建议将非常感激!
Im sure there are a thousand different posts on Maple vs Matlab, but i have a bit of a unique set of requirements and before i go off to learn one of the two i would like to know which one will do it best.
I have a set of data from an accelerometer recording an impact. I need to do the following:
- fit a curve to the data
- Find the equation for that curve
- solve the equation listed at the link
http://upload.wikimedia.org/wikipedia/en/math/2/d/3/2d39556df1dbbd467dc914253e93cdb0.png
which solves for a family of curves,i.e the MAX under the interval.
I would like to do this as seamlessly with visual studio as possible. The GUI and all the other elements of the app are built in VB and I would like to keep it there. I know maple has a code generating part to it that will convert to VB, would it be able to handle something like this? Does Matlab integrate with Visual Studio well? I would be thrilled if there was an object i could place on the VB form which would facilitate the communication to and from the matlab or maple framework. Currently i have it working with R, however to do so i need to write the data to a file, launch the R script, wait for it to finish, return control to my VB app and take it from there. This process takes too long and since i do not have experience with multi threaded programming the GUI freezes up when control is passed to the script.
Any help or suggestions would be very much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
就你而言,我不会选择两者中的任何一个。您可以查看 适用于 Visual Studio 的 Python 工具。该博客文章提到了对 NumPy 和 NumPy 的支持。 SciPy for .Net 为您提供所需的所有数学能力,可以很好地集成到 .Net 世界中。
编辑:
通过查看 matplotlib 的 gallery 我很想说 matplotlib 与 MATLAB 不相上下。
In your case I would choose neither of the two. You may have a look at Python Tools for Visual Studio. The blog post mentions support for NumPy & SciPy for .Net which gives you all the math power you need at hand well integrated in the .Net world.
EDIT:
By looking at matplotlib's gallery I'm tempted to say that matplotlib is on par with MATLAB.
MATLAB 不会自动生成 VB 代码,但可以轻松地从 VB 应用程序调用它,而无需间接编写文件。它具有可直接从 VB 代码中调用的 COM 接口。请参阅 MATLAB 文档中的示例来查找出去更多。
要进行您提到的技术分析,您可能可以使用曲线拟合工具箱 除了基础 MATLAB 之外。
请注意,上述通过 COM 接口连接到 MATLAB 的方法依赖于执行 VB 应用程序时存在 MATLAB 的实时副本。如果您需要与没有 MATLAB 副本的人共享您的应用程序,您还可以从 MATLAB 代码创建独立的 COM 组件和 .NET 程序集,这些组件可以通过 VB 代码以相同的方式调用,但可以部署没有 MATLAB 许可证的人可以免费使用 - 但是,这需要额外的产品,MATLAB Builder for .NET。
MATLAB doesn't auto-generate VB code, but it can easily be called from a VB application without the indirection of writing a file. It has COM interface that can be called directly from within VB code. See this example from the MATLAB documentation to find out more.
To carry out the technical analysis you've mentioned, you would probably save time by using Curve Fitting Toolbox in addition to base MATLAB.
Note that the above method of connecting to MATLAB via its COM interface relies on there being a live copy of MATLAB present when the VB application is executed. If you need to share your application with people who don't have a copy of MATLAB, you can also create standalone COM components and .NET assemblies from MATLAB code that can be called in the same way by your VB code, but can be deployed freely to people without a MATLAB license - however, this requires an extra product, MATLAB Builder for .NET.