Question: How to properly call a matlab user function from Maple

Hello,

 

This is more of a tutorial rather than a question because I found some mistakes and because the maple help file was a bit poorly explained and I am posting some additional details.

I am running version 16 of maple and version 7.12 R2011a of matlab.

 

If some of you are wondering how to call a Matlab user function in Maple this is what I have done:

 

First of all in the maple help file is says that you have to type

but I found this is wrong. you actually have to type

so in other words include parenthesis and quotation marks '.

 

Also is isn't explained in the maple file how to call the functions with variables as parameters. This is how to do it:

in other words use sprintf function.

 

Finally, if your matlab function calculates many variables as an output, you should modify your matlab function so that is produces a matrix (I haven't tested if a cells work) as an output that contains all your data.

 

This is what the final code looks like:


 

Please Wait...