link PHP with Octave or Matlab

和自甴很熟 提交于 2019-12-01 18:02:19

问题


Suppose I have a lot of math calculations which are quite tedious to implement in php. Is it possible to somehow link PHP and Octave on the server in such a way, that php sends parameters to Octave and receives answers back.

Has anyone tried anything similar?


回答1:


Another solution is to use octave-daemon, which was written specifically for this purpose. Works on Linux, don't know about Windows.




回答2:


You can use matlab compiler to make an executable matlab application, that you can call from php.




回答3:


GNU Octave can be called from PHP using the Linux command line, using commands like exec() or passthru(). Anyway, their appropriate use depends on what you are trying to do (there are no details of your problem).




回答4:


One way to do it, in Windows, is to compile Matlab as a DLL and include it ona web app (a WFC service, for example). At that point you have a functional "matlab service" and then you can access that service from PHP or any other language.




回答5:


It is also possible to create a .NET component using Matlab Builder NE, and deploy it using SilverLight on the web.



来源:https://stackoverflow.com/questions/8547303/link-php-with-octave-or-matlab

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!