5.0

5.0 | 14 ratings Rate this file 156 Downloads (last 30 days) File Size: 43.1 KB File ID: #6044

Mathematica Symbolic Toolbox for MATLAB--Version 2.0

by Ben Barrowes

 

12 Oct 2004 (Updated 10 Jun 2010)

A symbolic toolbox for MATLAB based on Mathematica.

| Watch this File

File Information
Description

A symbolic toolbox that provides MATLAB users with all of the symbolic and high-precision numeric capabilities of Mathematica. It uses the MathLink communication standard supplied with Mathematica and the MEX facility of MATLAB. In addition, since MathLink can pass native MATLAB matrices (and not just strings) between Mathematica and MATLAB, it is quick and easy to construct matrices in either system and pass them to the other. One can freely mix Mathematica code and MATLAB code without the bother of writing M-files to convert matrices into strings and back. The Mathematica Symbolic Toolbox for MATLAB is implemented as a single MEX-file and the source code is included. Precompiled linux and windows executables are included. Installation instructions for MACs are included in the README.Version 2.0 has been updated from:http://library.wolfram.com/infocenter/MathSource/624 to work with MATLAB R2007b and Mathematica 6.0.

MATLAB release MATLAB 7 (R14)
Other requirements Mathematica
Tags for This File  
Everyone's Tags
code generation(2), interfacing, mathlink, matlab, matrices, matrix, symbolic math
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (25)
26 Sep 2012 Jessica

I've used this for a few years and find it works very well. I'm trying now to compile it on a Mac running OS 10.7.5

I'm using the command

mex -I/usr/include/ -lMLi3 math.c

and get

if: Expression Syntax.
ld: library not found for -lMLi3
collect2: ld returned 1 exit status

mex: link of ' "math.mexmaci64"' failed.

The library file is definitely in the directory I'm specifying. I see a note in the README that the library path needs to be on the (DY)LD_LIBRARY_PATH - could this be the problem? Any advice would be appreciated

01 Sep 2012 Anh Nguyen

I have the same problem when trying to install the packet. I am using Matlab2011b (64bit), Mathematica, 8.0 Windows 7. When I run "mex - setup" from Matlab, it shows

C:\PROGRA~1\MATLAB\2011B\BIN\MEX.PL: Error: '–setup' not found.

Error using mex (line 206)
Unable to complete successfully.

I appreciate very much if anyone can help.

17 Jul 2012 jure

i forgot to tell; I have Mathematica 8, MATLAB R2011b and Windows Vista

17 Jul 2012 jure

I have troubles with installing this toolbox. After choosing Microsoft Visual C/C++, Mex-setup gives me an error:
mex-setup
Usage:
MEX [option1 ... optionN] sourcefile1 [... sourcefileN]
[objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]

Use the -help option for more information, or consult the MATLAB API Guide.


C:\PROGRA~1\MATLAB\R2011B\BIN\MEX.PL: Error: No file names given.

Undefined function or variable 'setup'.

I have no idea what I'm doing wrong, so if anyone can help me I'll be really grateful. Thanks.

26 Jun 2012 Georg Wechslberger

In newer OS X Version you have to add the additional flag
"-framework Foundation"
to CLIBS in mexopts.sh

24 Jun 2012 Ross Anderson  
12 May 2012 ahmed abd el aziz

how i download toolbox thanks in advance

28 Mar 2011 Huang Meng

I wonder how to pass the symbolic in matlab to mathematica and return the result to matlab

24 Mar 2011 Matthias

Hello,
I liked this toolbox very much. I used it successfully with Matlab R2010a and Mathematica 7.0. But now it won't start anymore. I get following error:
"MathLink connection unexpectedly NULL!"
I additionally installed Mathematica 8.0. Is this problem or is it because of some windows updates?

17 Oct 2010 Abdulwahab Abokhodair

An excellent contribution. Stable and reliable. Thank you Ben.

08 Sep 2010 Denis Rosset

Excellent package, thank you !

27 Jul 2010 Tomohiko Takamura

This works under x64 environment;
Mathematica 7.0 win64, MATLAB win64 7.10, Visual Studio 2008, Vista x64.
You have to use mldev64\include and lib\ml64i3m.lib instead of 32bits one.

Be careful not to use Visual Studio Express edition.
I failed to compile mex at first, as they have no x64 libs.
Thx.

15 Jun 2010 Dmitry Savransky

As usual from this author, a great addition to MATLAB. Quick note for those compiling on OS X - make sure you edit math.c line 227 as suggested in the comments below it, but don't worry about setting the library path. Your mex line should be something like:
mex -I/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/CompilerAdditions/ -L/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/CompilerAdditions/ -lMLi3 math.c

21 Apr 2010 Jonas Morsbøl

Tested with MATLAB 2009b and Mathematica 7 on Win Vista. Seems to work fine!

04 Dec 2009 Ahmad Chkeir

hello guys.
I just installed Matlab 2009a but it dosen't include symbolic toolbox. I downloaded this file "Mathematica Symbolic Toolbox for MATLAB--Version 2.0" but I didn't know what to do later. how can
i add the symbolic tool to my matlab ?

26 Jun 2009 Gonçalo Tavares

Hi,
I downloaded this package but got a segmentation violation when running the supplied precompiled math.dll. I am using Matlab 2008a and Mathematica 6.0. Then I copied the mathlink.h and the ml32i1m.lib from the Mathematica directory and tried compiling math.c. However, when I run the mathrun.m script on Matlab I get this error:

C:\PROGRA~1\MATLAB\R2008A\BIN\MEX.PL: Error: 'and' not found.

??? Error using ==> mex at 207
Unable to complete successfully.

Any help?
Thanks a lot.
Gonçalo

Error in ==> mathrun at 8
eval(command)

21 Nov 2008 Martin

I try to install it on Mac OS 10.4.
I cannot compile math.c with mex, i get a parse error the following error:

In file included from math.c:35:
/Applications/Mathematica 5.2.app/AddOns/MathLink/DeveloperKit/Darwin/CompilerAdditions/mathlink.h:92: error: parse error before 'yet'
/Applications/Mathematica 5.2.app/AddOns/MathLink/DeveloperKit/Darwin/CompilerAdditions/mathlink.h:408: error: syntax error before 'enum'
math.c: In function 'MathLinkStringEval':
math.c:332: warning: passing argument 3 of 'MLGetByteString' from incompatible pointer type
math.c: In function 'WaitForReturnPacket':
math.c:566: warning: passing argument 3 of 'MLGetByteString' from incompatible pointer type

Can anybody help me?
Thanks

06 Oct 2008 a s

In case anyone gets here b/c they're having the same problem I was, I figured out how to fix the problem.

The issue is that when you do: -lML the compiler looks for a library named libML.a. However, on my machine the library is named libMLi3.a.

Therefore if I run:
/Applications/MATLAB74/bin/mex -I/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/CompilerAdditions/ -L/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/CompilerAdditions/ -lMLi3 math.c

Then everything works out hunky dory.

Thanks,
AS

29 Sep 2008 a s

I can't get this to compile on my Mac (OS 10.5.5).

I changed the math.c file as instructed in the readme. When i compile I get an error:
$ /Applications/MATLAB74/bin/mex -I/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/CompilerAdditions/ -L/Applications/Mathematica.app/SystemFiles/Links/MathLink/DeveloperKit/CompilerAdditions/ -lML math.c
ld: library not found for -lML
collect2: ld returned 1 exit status

mex: link of 'math.mexmac' failed.

----
Anyone have any suggestions as to why that is not working?

Thanks,
AS

03 Dec 2007 shisen du

optical laser

24 Nov 2007 arash paivar

dear ben do you know why i recieved incorrect result by this:
k=sym('k','positive');
z1=1.21+0.008*i
k1=((z1-k))^(1/2);

t=2*pi*k/(imag(k1))
s=int(t,k);

31 May 2006 John Szumiloski

Not thoroughly tested, but so far appears to do just what the help files say. This is an invaluable tool to supplement the numeric and application-specific capabilities of MATLAB with the symbolic and programming (Map[], Apply[], etc.)strengths of Mathematica. Just what I needed. Fantastic! (Note: MathSource link is not right as of 2006-05-31. should be space between final '624/' and 'to'.)

08 May 2006 Indrid Cold

Wow! Appreciate this a lot.

27 Feb 2006 Matt W.

Awesome! you saved me from coding MathieuC, thank you

04 Sep 2005 Walid Maghroum

Hi,
Thank you for updating the archive to work with matlab 7.0.
Could you please check the .tar archive?The I could not open the archive because it seems to be corrupted.
thanks a lot
Walid

Updates
28 Oct 2004

Title should be 2.0, slightly updated mex file and README file.

29 Nov 2004

Now including windows dll. Updated description.

12 May 2005

updated help for windows users

20 Oct 2005

Updated with MAC installation instructions.

25 Oct 2005

Better packaging.

03 Mar 2006

better windows support

06 Mar 2006

better windows support

06 Mar 2007

Documentation link fix.

19 Dec 2007

Doc update. New binary. Recompiled to work with most recent versions.

01 Jan 2008

Slight update for windows users.

09 Jun 2010

updated to work with mathematica 7

10 Jun 2010

Removed mex file

Contact us