Interface between Matlab and Mathematica

Status
Not open for further replies.

eltonjohn

Advanced Member level 4
Joined
Feb 22, 2002
Messages
1,434
Helped
64
Reputation
126
Reaction score
29
Trophy points
1,328
Activity points
16,329
matlab2mathematica

I'm doing something so COOL! .That i can't tell you because then i have to kill you!

Ok i will tell you i want to map a fingerprint to a PIN NUMBER ..get it
now i will kill you !
Anyways i needed a way interface matlab and mathematica . Mathematica symbol manipulation is really great ! ,but matlab opens door to so many things
DSPs ,HDL etc .so it would be great to have an interface between both. Well i look on the web and yes that interface exists already and exists in two forms
one as a toolbox for MATLAB and second as package for mathematica .All that is possible because MATHEMATICA has a comunication channel with the kernel called mathlink . and is possible to deal with the mathematica symbolic engine and use it as a server .
Very cool !


this is one posibility
https://library.wolfram.com/infocenter/MathSource/618/
and of course this beauty
https://library.wolfram.com/infocenter/MathSource/5344/

Oh is so great ,Now from matlab i can harness all the MATHEMATICA symbolic power !!!
I don't even need to open Mathematica it works with the terminal interface to the kernel !!

Example ..

>> math('$Version') <----math is the communication function with mathematica
Mathematica Kernel loading...

ans =

4.2 for Linux (August 23, 2002)

>> math('N[EulerGamma,40]')

ans =

0.5772156649015328606065120900824024310422

>> math('Integrate[Log[x]^(3/2),x]')

ans =

3 Sqrt[Pi] Erfi[Sqrt[Log[x]]] -3 x
----------------------------- + Sqrt[Log[x]] (---- + x Log[x])
4 2

>> math('InputForm[Integrate[Log[x]^(3/2),x]]')

ans =

(3*Sqrt[Pi]*Erfi[Sqrt[Log[x]]])/4 + Sqrt[Log[x]]*((-3*x)/2 + x*Log[x])

>> math(['Integrate[',ans,',x]'])

ans =

3 Sqrt[Pi] x Erfi[Sqrt[Log[x]]]
------------------------------- -
4

Pi
3 Sqrt[--] Erfi[Sqrt[2] Sqrt[Log[x]]]
2
> ------------------------------------- +
16

2 2
-9 x x Log[x]
> Sqrt[Log[x]] (----- + ---------)
8 2
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…