How do I translate code from Maple to MATLAB?
33 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I would like to know if it was possible (and easy) to translate a whole worksheet of code from maple to MATLAB (and possibly the functions that are called inside the Maple code).
Thank you
2 Commenti
Muthu Annamalai
il 19 Lug 2013
Could you be more specific? There is nothing that is not possible with enough time, effort, given MATLAB is a general purpose language as well.
Larry Gulliver
il 20 Gen 2021
I just tried cutting and pasting directly from Maple v2020.1 to Matlab 2015b editor and it was almost perfect. Mind you I had to piecemeal it by function to make sure it worked and it was a fairly simple code without derivatives, matrices or logical arguments. I did have to tweak some of the multiplication symbols but other than that it seemed to work.
The CodeGenerator was not successful for me as it gave an output of a bunch of unneccessary symbols.
Risposte (2)
Muhammad Awais
il 24 Gen 2018
- open maple
- go into tools option
- click assistance option
- then click on code generation
- paste the maple code there and select the language you want to convert.
- press refresh and here it is..thank you :)
4 Commenti
Alex
il 29 Gen 2023
I want to translate the maple code precisely because I do not have a Maple license :(
Walter Roberson
il 29 Gen 2023
Alex
In that case you are going to need to study the documentation of Maple to figure out how it operates and get accustomed to the way that people program in it. Personally I found that the 5th edition of the user manual (1990) was the best for learning the language, as back then it was an actual book intended to teach, not just a syntax and library interface description. You can going to find it difficult to learn the language well enough without having access to a copy of the program to execute tests with, but with the book in hand you should certainly be able to make some progress.
I would, however, suggest to you that if you are student or academic that getting a software license from Maplesoft would be a lot less expensive of your time than the cost of trying to learn the language well enough to translate code without having access to program.
Praveen kumar N
il 20 Gen 2017
select the math block from the maple and right click of the mouse the language conversion to MATLAB then u get a line of code and copy to matlab editor
1 Commento
Walter Roberson
il 20 Gen 2017
This is true as far as it goes, but there are a lot of limitations in the conversion. The conversion is done by CodeGeneration[Matlab] by the way. It is extensible but it can be difficult to make more than minor changes.
There are a lot calls that the conversion cannot handle, and the output format is not nice. It uses floating point for even trivial numbers, and no spaces.
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!