<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, Matlab-Maple interface</title>
    <link>http://www.mapleprimes.com/questions/121093-MatlabMaple-Interface</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Fri, 12 Jun 2026 19:14:27 GMT</lastBuildDate>
    <pubDate>Fri, 12 Jun 2026 19:14:27 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, Matlab-Maple interface</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, Matlab-Maple interface</title>
      <link>http://www.mapleprimes.com/questions/121093-MatlabMaple-Interface</link>
    </image>
    <item>
      <title>evalM</title>
      <link>http://www.mapleprimes.com/questions/121093-MatlabMaple-Interface?ref=Feed:MaplePrimes:Matlab-Maple interface:Comments#answer121102</link>
      <itunes:summary>&lt;p&gt;You should be able to use Maple's &lt;a href="http://www.maplesoft.com/support/help/Maple/view.aspx?path=Matlab/evalM"&gt;evalM&lt;/a&gt; command for this. (note the mixed capitalization of that command.)&lt;/p&gt;
&lt;p&gt;The expressions in Matlab syntax that evalM supports includes function calls. You can even call it several times back-to-back in order to set the working directory, assign variables, then call a matlab function with them, etc. (You might have to set the working directory in order for matlab to pick up some function you might have in a .m file, etc.)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/43412-Global-Optimization-Toolbox"&gt;Here&lt;/a&gt;'s someone doing all that.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;You should be able to use Maple's &lt;a href="http://www.maplesoft.com/support/help/Maple/view.aspx?path=Matlab/evalM"&gt;evalM&lt;/a&gt; command for this. (note the mixed capitalization of that command.)&lt;/p&gt;
&lt;p&gt;The expressions in Matlab syntax that evalM supports includes function calls. You can even call it several times back-to-back in order to set the working directory, assign variables, then call a matlab function with them, etc. (You might have to set the working directory in order for matlab to pick up some function you might have in a .m file, etc.)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/43412-Global-Optimization-Toolbox"&gt;Here&lt;/a&gt;'s someone doing all that.&lt;/p&gt;</description>
      <guid>121102</guid>
      <pubDate>Sat, 04 Jun 2011 05:08:45 Z</pubDate>
      <itunes:author>pagan</itunes:author>
      <author>pagan</author>
    </item>
    <item>
      <title>Maple Toolbox for Matlab</title>
      <link>http://www.mapleprimes.com/questions/121093-MatlabMaple-Interface?ref=Feed:MaplePrimes:Matlab-Maple interface:Comments#answer121162</link>
      <itunes:summary>&lt;p&gt;The evalM command is for calling Matlab commands from Maple. &amp;nbsp;I think Subhra is looking for the reverse direction -- calling Maple commands from within Matlab. &amp;nbsp;This can be done using the Maple Toolbox for Matlab (MTM).&lt;/p&gt;
&lt;p&gt;When you first installed Maple it may have asked you about a path to Matlab in order to set up MTM. &amp;nbsp;If you have the directory $MATLAB/toolbox/maple (where $MATLAB is the path to your Matlab install), then you likely have everything all ready to go. &amp;nbsp;Otherwise, run "MapleToolbox.bat", or similar platform specific install script sitting in your root Maple program directory.&lt;/p&gt;
&lt;p&gt;The documentation for this toolbox is all inside Matlab. &amp;nbsp;Reference it by typing the following at the Matlab command prompt:&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt; doc maple&lt;/p&gt;
&lt;p&gt;There are many commands to seamlessly call into maple to do computations using Matlab syntax. &amp;nbsp;There is also a general command called "maple", which will accept arbitrary Maple expressions. &amp;nbsp;For example:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&amp;gt;&amp;gt; x = sym('x');
&amp;gt;&amp;gt; x^3+cos(2*x)-1

 ans =
          3
         x   + cos(2 x) - 1
&amp;gt;&amp;gt; diff(x^3)
 
 ans =
                   2
               3 x
&amp;gt;&amp;gt; maple('int',ans,'x')
 
 ans =
                   3
                  x
&amp;gt;&amp;gt; maple('evalf(Pi,10)')

 ans =
            3.141592654
  
&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;The commands above are all typed at a Matlab prompt. &amp;nbsp;sym declares a variable as a Maple expression, which you can then use with various commands like "diff", that are part of MTM (and call directly through to Maple's diff command). &amp;nbsp;The first use of the maple command shows how to pass arguments computed in Matlab. &amp;nbsp;The second use shows a self contained Maple expression.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;The evalM command is for calling Matlab commands from Maple. &amp;nbsp;I think Subhra is looking for the reverse direction -- calling Maple commands from within Matlab. &amp;nbsp;This can be done using the Maple Toolbox for Matlab (MTM).&lt;/p&gt;
&lt;p&gt;When you first installed Maple it may have asked you about a path to Matlab in order to set up MTM. &amp;nbsp;If you have the directory $MATLAB/toolbox/maple (where $MATLAB is the path to your Matlab install), then you likely have everything all ready to go. &amp;nbsp;Otherwise, run "MapleToolbox.bat", or similar platform specific install script sitting in your root Maple program directory.&lt;/p&gt;
&lt;p&gt;The documentation for this toolbox is all inside Matlab. &amp;nbsp;Reference it by typing the following at the Matlab command prompt:&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt; doc maple&lt;/p&gt;
&lt;p&gt;There are many commands to seamlessly call into maple to do computations using Matlab syntax. &amp;nbsp;There is also a general command called "maple", which will accept arbitrary Maple expressions. &amp;nbsp;For example:&lt;/p&gt;
&lt;blockquote&gt;
&lt;pre&gt;&amp;gt;&amp;gt; x = sym('x');
&amp;gt;&amp;gt; x^3+cos(2*x)-1

 ans =
          3
         x   + cos(2 x) - 1
&amp;gt;&amp;gt; diff(x^3)
 
 ans =
                   2
               3 x
&amp;gt;&amp;gt; maple('int',ans,'x')
 
 ans =
                   3
                  x
&amp;gt;&amp;gt; maple('evalf(Pi,10)')

 ans =
            3.141592654
  
&lt;/pre&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;The commands above are all typed at a Matlab prompt. &amp;nbsp;sym declares a variable as a Maple expression, which you can then use with various commands like "diff", that are part of MTM (and call directly through to Maple's diff command). &amp;nbsp;The first use of the maple command shows how to pass arguments computed in Matlab. &amp;nbsp;The second use shows a self contained Maple expression.&lt;/p&gt;</description>
      <guid>121162</guid>
      <pubDate>Mon, 06 Jun 2011 19:32:04 Z</pubDate>
      <itunes:author>Paul</itunes:author>
      <author>Paul</author>
    </item>
    <item>
      <title>Maple Toolbox for Matlab</title>
      <link>http://www.mapleprimes.com/questions/121093-MatlabMaple-Interface?ref=Feed:MaplePrimes:Matlab-Maple interface:Comments#answer135914</link>
      <itunes:summary>



</itunes:summary>
      <description>



</description>
      <guid>135914</guid>
      <pubDate>Tue, 17 Jul 2012 02:32:35 Z</pubDate>
      <itunes:author>Subhra</itunes:author>
      <author>Subhra</author>
    </item>
    <item>
      <title>Thanks Paul ! that really clarifies my doubt.</title>
      <link>http://www.mapleprimes.com/questions/121093-MatlabMaple-Interface?ref=Feed:MaplePrimes:Matlab-Maple interface:Comments#comment134954</link>
      <itunes:summary>&lt;p&gt;Thanks Paul ! that really clarifies my doubt. Yea I don't have the toolbox installed. I need to install it.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Thanks Paul ! that really clarifies my doubt. Yea I don't have the toolbox installed. I need to install it.&lt;/p&gt;</description>
      <guid>134954</guid>
      <pubDate>Sun, 10 Jun 2012 06:55:37 Z</pubDate>
      <itunes:author>Subhra</itunes:author>
      <author>Subhra</author>
    </item>
    <item>
      <title>Hello Paul,Thanks for your reply. I have</title>
      <link>http://www.mapleprimes.com/questions/121093-MatlabMaple-Interface?ref=Feed:MaplePrimes:Matlab-Maple interface:Comments#comment135916</link>
      <itunes:summary>&lt;pre&gt;Hello Paul,&lt;br&gt;&lt;br&gt;Thanks for your reply. I have now installed Maple 16 which provided Maple Toolbox for Matlab. So now I can execute the commands you had specified before in matlab command window. However when I define a maple procedure as .mw file and try to read it from Matlan command window, I am getting following error:&lt;br&gt;&lt;br&gt;procread('fndRoot.mw');&lt;br&gt;&lt;br&gt;--where "fndRoot" is the name of my procedure and it is saved as .mw file. then i get following error msg:&lt;br&gt;^&lt;br&gt;??? Error using ==&amp;gt; maplemex&lt;br&gt;Error, while reading `C:\Program Files\MATLAB\R2011a\toolbox\maple\fndRoot.mw`&lt;br&gt;Error in ==&amp;gt; procread at 45&lt;br&gt;maplemex('0MTM:-procread',a);&lt;br&gt;&lt;br&gt;&lt;br&gt;Could you kindly help me out with this?&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;Subhra&lt;/pre&gt;</itunes:summary>
      <description>&lt;pre&gt;Hello Paul,&lt;br&gt;&lt;br&gt;Thanks for your reply. I have now installed Maple 16 which provided Maple Toolbox for Matlab. So now I can execute the commands you had specified before in matlab command window. However when I define a maple procedure as .mw file and try to read it from Matlan command window, I am getting following error:&lt;br&gt;&lt;br&gt;procread('fndRoot.mw');&lt;br&gt;&lt;br&gt;--where "fndRoot" is the name of my procedure and it is saved as .mw file. then i get following error msg:&lt;br&gt;^&lt;br&gt;??? Error using ==&amp;gt; maplemex&lt;br&gt;Error, while reading `C:\Program Files\MATLAB\R2011a\toolbox\maple\fndRoot.mw`&lt;br&gt;Error in ==&amp;gt; procread at 45&lt;br&gt;maplemex('0MTM:-procread',a);&lt;br&gt;&lt;br&gt;&lt;br&gt;Could you kindly help me out with this?&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;Subhra&lt;/pre&gt;</description>
      <guid>135916</guid>
      <pubDate>Tue, 17 Jul 2012 02:44:11 Z</pubDate>
      <itunes:author>Subhra</itunes:author>
      <author>Subhra</author>
    </item>
    <item>
      <title>@Subhra&amp;nbsp;
procread works with .mpl files</title>
      <link>http://www.mapleprimes.com/questions/121093-MatlabMaple-Interface?ref=Feed:MaplePrimes:Matlab-Maple interface:Comments#comment135929</link>
      <itunes:summary>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/121093-MatlabMaple-Interface#comment135916"&gt;@Subhra&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;procread works with .mpl files -- plain text files of Maple commands.&amp;nbsp; The .mw file in your example is not a plain text file.&amp;nbsp;&amp;nbsp; To turn it into one, load it up in Maple's gui, and select File-&amp;gt;Export.&amp;nbsp; Choose "Maple Input (.mpl)" as the export format in the file type drop down and click Save.&amp;nbsp; Inspect the saved file in a plain text editor like notepad.&amp;nbsp; You will see the same commands listed as in your worksheet, but output regions will be put into comments.&amp;nbsp; This file can be run in Maple using the "read" command.&amp;nbsp; It is also now suitable for use with "procread" in Matlab.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;&lt;a href="http://www.mapleprimes.com/questions/121093-MatlabMaple-Interface#comment135916"&gt;@Subhra&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;procread works with .mpl files -- plain text files of Maple commands.&amp;nbsp; The .mw file in your example is not a plain text file.&amp;nbsp;&amp;nbsp; To turn it into one, load it up in Maple's gui, and select File-&amp;gt;Export.&amp;nbsp; Choose "Maple Input (.mpl)" as the export format in the file type drop down and click Save.&amp;nbsp; Inspect the saved file in a plain text editor like notepad.&amp;nbsp; You will see the same commands listed as in your worksheet, but output regions will be put into comments.&amp;nbsp; This file can be run in Maple using the "read" command.&amp;nbsp; It is also now suitable for use with "procread" in Matlab.&lt;/p&gt;</description>
      <guid>135929</guid>
      <pubDate>Tue, 17 Jul 2012 17:47:55 Z</pubDate>
      <itunes:author>Paul</itunes:author>
      <author>Paul</author>
    </item>
  </channel>
</rss>