Using a MATLAB code on Scilab

混江龙づ霸主 提交于 2020-01-22 14:34:10

问题


Is it possible to use a MATLAB code on Scilab? Is that what is meant when saying that Scilab is a "clone" from MATLAB?


回答1:


I would not bet on it. But if your code is simple enough chances are good.

Problems are:

  • There is encrypted p-code in Matlab that Scilab will not be able to open.

  • Matlab usually comes with a number of toolboxes that might not be available to you (i think especially Simulink)

  • last but not least (i don't know about scilab) there usually are minute differences in how functions are implemented.




回答2:


Yes you can use MATLAB code on scilab. See these links for more information:

  1. http://help.scilab.org/docs/5.4.0/fr_FR/section_36184e52ee88ad558380be4e92d3de21.html

  2. http://help.scilab.org/docs/5.4.0/en_US/index.html




回答3:


There is a tool to automatically convert Matlab source to Scilab source, it's called M2SCI. A script parses the Matlab source code and replaces Matlab-specific functions by Scilab ones. See the documentation of the mfile2sci function.




回答4:


There are a number of projects out there trying to replicate/replace MATLAB:

  1. Julia language: which has a relatively similar syntax to MATLAB and offers great performance, but still lacks a lot of toolboxes/libraries, as well as not having a GUI like MATLAB. I think this has the brightest future among all MATLAB alternatives.
  2. Python language and its libraries numpy and matplotlib: which is the mostly used alternative. I think at this moment the community is a couple of orders of magnitude even bigger than MATLAB. Python is the de facto standard in machine learning and data science at the moment. But still the syntax and memory concept is a bit far from what people are used to in the MATLAB ecosystem. There are also no equivalent to SIMULINK, although Spyder and Jupyter projects have come a long way in terms of development environment.
  3. Octave: is basically a clone of MATLAB to a point they consider any incompatibility as a bug. If you have a long MATLAB code which you don't want to touch, this is the safest bet. But again no alternative for SIMULINK.
  4. SciLab and its fork ScicoLab are the best alternatives in terms of GUI, having a SIMULINK replica xcos / scicos and a graphical user interface development features. However the community is not as big as Octave and the syntax is not completely compatible.
  5. Honorary mention of Modelica language implementations OpenModelica and jModelica for being a superior alternatives to SIMULINK-SimScape. You should know that you can load Modelica scrips also in xcos and scicos.

you may check the MATLAB's Alternativeto page to see more Free and Open source alternatives.



来源:https://stackoverflow.com/questions/14811309/using-a-matlab-code-on-scilab

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