Using a MATLAB code on Scilab

23,649

Solution 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.

Solution 2

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.

Solution 3

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

Solution 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 most 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 the 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 that you don't want to touch, this is the safest bet. But again no alternative for SIMULINK.
  4. SciLab and it's 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. Sadly the Scilab development team has gone through a devastating family crisis leading to the software falling behind.
  5. Honorary mention of Modelica language implementations OpenModelica and jModelica for being a superior alternative to SIMULINK-SimScape. You should know that you can load Modelica scrips also in xcos and scicos. If you want to kno wmore about JModelica you may see this post.

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

Share:
23,649
user2013394
Author by

user2013394

Updated on July 09, 2022

Comments

  • user2013394
    user2013394 almost 2 years

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

  • bdecaf
    bdecaf over 8 years
    I'm curios about the downvotes. Especially since the other answers clearly suggest that it is required to convert Matlab code.