Workaround for Maple in MATLAB - matlab

I am trying to get the MATLAB toolbox SOSTOOLS to work inside a MATLAB R2010b (7.11.0.584) but get the following error:
??? Error using ==> maple at 54 The MAPLE command is not available.
Googling it I found out that MATLAB stopped using Maple at some stage and switched to MuPad.
Short of switching to an older version of MATLAB, is there a known workaround for this situation?

A solution in the form of installing Maple as the symbolic toolbox engine is not possible with your version of Matlab.
This outlines an alternative possible solution, I did not find a concrete workaround that will spare you work. I recommend you contact the authors, or check for octave versions with the same functionality.
The change to MuPad is a problem that's been posted numerous times, and there is a useful discussion of differences between Maple and MuPad here:
http://www.walkingrandomly.com/?p=178
For some commands it looks like a simple translator might work. Most of the implementation would apparently be in parsing the output from MuPad and turning it into what Maple would generate. The input to MuPad and Maple is apparently equal most of the time, but read the doc above.
To write a translator, you redirect calls to maple by placing in your path the following function maple that calls mupad:
function output=maple(input);
%prepare input here (if necessary) ...
output=mupad(input);
% parse the output (if necessary) ...
More likely than not, a naive call to this re-director will not solve the problem without some input/output parsing.

Related

MATLAB's makecform in Octave

I use MATLAB's makecform in a script. However, the script takes a while to run, so I want to run it on a server. On this server, I have Octave instead of MATLAB.
Octave cannot find the function makecform.
I Googled the problem and found that this is not implemented in Octave, but that was from a mailing list in 2013. Is there (now) an alternative function for makecform in Octave?
I cannot say about the alternatives but I can confirm that the function is not yet implemented.
the makecform function belongs to the image package from Octave Forge.
makecform is present in the missing functions list of the package. You can see the evidence for the same in this link.
If you have some idea about how to implement the function, feel free to contribute.

Running Mathematica from MatLab

I need to run some mathematica commands inside matlab codes. Looking around I found there used to be two alternatives for this:
-SMATLink (http://www.mathworks.com/matlabcentral/fileexchange/20573-smatlink-let-matlab-dance-with-mathematica)
-Mathemtica Symbolic Toolbox for MatLab (http://www.mathworks.com/matlabcentral/fileexchange/6044-mathematica-symbolic-toolbox-for-matlab-version-2-0)
Both are old however and won't run on newer versions of MatLab. Does anybody know an alternative? MatLink only seems to interact Mathematica with MatLab by running commands in Mathematica, so it does suit not my needs...
Thanks in advance.

Matlab, an error after using fitctree function

I am trying to construct a decision tree. I tried using the fitctree function and wrote:
ctree = fitctree(TrainingX,TrainingY);
such that TrainingX is the input matrix and TrainingY is the target matrix. An error appears saying that:
Undefined function 'fitctree' for input arguments of type 'double'.
I don't know what is the problem and what should I do to solve it. Could you please help me?
The reason why it is undefined is because fitctree requires the Statistics Toolbox in MATLAB. If you don't have the Statistics Toolbox, you can't use this function and you're SOL. Sorry!
Even with the Statistics Toolbox, fitctree is only available for recent editions of MATLAB (R2014a+). Check the release notes on the Statistics Toolbox for more details: http://www.mathworks.com/help/stats/release-notes.html. Go to where R2014a is and fully expand out all of the facts by clicking on Expand All. Where you see "Functions for classification methods and clustering", you'll see an entry for fitctree there.
The only option would be to upgrade your version of MATLAB to at least R2014a or above.
Good luck!

using autocorr for different matlab versions

I'm trying to compute the autocorrelation of my timeseries. This work on my laptop with matlab R2011a, but not on my desktop with matlab R2013a. I read somewhere that the Signal Processing Toolbox needs to be installed, and that is the case on both of my computers. There seems to be no function at all called autocorr, but I can find it again on the matworks documentation for 2014b. I have the same problem with xcorr, although matlab seems to recognize the function ('help xcorr' works, 'help autocorr' not).
How can I fix this?

Differencies in Mex-file for Matlab

I have created a Mex-file (.mexw64) from my matlab project using Matlab Coder. The problem is that the output is not the same when I run the mex-file as when I run the project in a normal way. Often the variation in the numbers are really small:
5.4463.. -> 5.4465.. etc.
I'm thinking that there might be a problem related fixed point computations. What should I look for?
Expected differences from MATLAB are explained in the documentation. See the section on Floating-point Numerical results:
MATLAB Coder Documentation on expected differences.