Will code from Matlab R2012b work in Matlab R2013a environment? - matlab

Will code from Matlab R2012b work in Matlab R2013a environment?
I am not sure if I should switch from Matlab R2012b to Matlab R2013a?
I heard there are nice new features, but my major concern is whether my
code from 2012b will work with 2013a.
Please let me know if you have some major warnings about this.
Thanks

It is very rare for a new version to be incompatible with code of previous versions (unless you upgrade from dinosaur versions).

There's a brief list of changes here. This includes several set theory functions whose behavior has changed, and a few less commonly used things that have been removed.

Related

How compile m-file without installed Matlab?

What is the simplest way to compile m-file without installed matlab?
And can someone say when will users get possibility for compiling programs with training networks (not only using training networks in compiling)?
MATLAB is not a compiled language, it is interpreted at runtime, so you need to have MATLAB installed to run a m-File (script). You can use the MATLAB compiler software to create a standalone application from an m-File or a function.
To run an m-file without having MATLAB, you can use GNU Octave. Octave is an open-source software which has almost the same syntax and functionality as MATLAB. They are not 100% identical though, so you will have to migrate your script. As mentioned in this question, code which runs in MATLAB will almost always run in Octave too, so it should work quite well.
for very basic scripting you can use this online octave(/matlab) compiler I found http://www.tutorialspoint.com/matlab/try_matlab.php There are some limitations of course, but for basic scripts it works well

Run OpenCL from MATLAB

I've been searching around for some way to easily interface opencl code with MATLAB code, however most of what I've found is several years old and I'm wondering if it's still applicable.
Does anyone know of a way to do this?
Have you tried the OpenCL Toolbox?
Also the MATLAB Parallel Computing Toolbox may be a useful alternative if you have the license for it.
Also see Jacket.
The last two may require you to rewrite your code in the matlab language, if that is an acceptable price.

What are potential problems in upgrading matlab from R2011a to R2013a

I am currently working in matlab R2011a. These are the tools that I am using
neural-network toolbox
curve-fitting toolbox
I want to use forecast and kalman filter functions which are unavailable in R2011a . Hence I am considering to update to R2013a . But, I am concerned that all of my functions would give the exact same output or not.
Can anyone post some reference or any experience in this matter , so that I can be sure.
Reference or experience to any issues in upgrading the version is appreciated.
I would suggest going through the release notes for each of those 3 products to check for known compatibility considerations:
http://www.mathworks.co.uk/help/nnet/release-notes.html
http://www.mathworks.co.uk/help/curvefit/release-notes.html
(I don't know what the time series toolbox is, it doesn't seem to be a MathWorks product).

How from script in Matlab 2011a call function from Matlab 2013b?

I have a bunch of scipts and MEX-files that developed for MAtlab 2011a version. They doesn't work on 2013b version. But Matlab 2013b has a function with desired functionality... So how can I run scipts in Matlab 2011a, but with call one function from 2013b version?
I have error
Unexpected Standard exception from MEX file.
What() is:
Device -1: deviceMatrix(): no CUDA-capable device is detected
what looks like unsolvable for me because I cannot rewrite MEX-file.
There is CUDA-device which is detected fine by 2011a version.
I'm asking a particular question. I cannot rewrite MEX-file because I do not want to dive into it - it is not my code and I don't know CUDA and that way that I'm asking for looks like much simpler for me at least at this step of my work. Later if function will fits for me I will think about going to Matlab 2013b version.
Yes, CUDA is aviable on Matlab 2013b.

Using a MATLAB code on Scilab

Is it possible to use a MATLAB code on Scilab? Is that what is meant when saying that Scilab is a "clone" from MATLAB?
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.
Yes you can use MATLAB code on scilab. See these links for more information:
http://help.scilab.org/docs/5.4.0/fr_FR/section_36184e52ee88ad558380be4e92d3de21.html
http://help.scilab.org/docs/5.4.0/en_US/index.html
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.
There are a number of projects out there trying to replicate/replace MATLAB:
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.
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.
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.
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.
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.