Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'how can I export mathematica equations to matlab?' topicStudent Support Forum > General > "how can I export mathematica equations to matlab?"

Next Comment >Help | Reply To Topic
Author Comment/Response
Per Viberg
03/25/01 9:46pm

yes, I need mathematica to solve a system of equations symbolically and then I need to export the solutions in matlab formatted code to be able to simulate in Simulink.

mathematica uses a Latex-coding that doesn't please Matlab exactly,
It looks somthing like this

IdSin[q2]w2+(Id+Kd)Sin[q2]Sin[q3](w2+w3) +....(lots of more factors)

correct matlab code would be
Id*sin(q2)*w2+(Id+Kd)*sin(q2)*sin(q3)*(w2+w2) +...

I can substitue Sin[q2]/.->sin2 paste the code directly to matlab and then substitute to sin(q2) but I can't get the ''*'', mainly because mathematice doesn't write it in outputs.

The equtions are huge so it will take forever to do it manually.

reg.

/Per

URL: ,

Subject (listing for 'how can I export mathematica equations to matlab?')
Author Date Posted
how can I export mathematica equations to matlab? Per Viberg 03/25/01 9:46pm
Re: how can I export mathematica equations to m... Henry Lamb 03/28/01 3:01pm
Re: how can I export mathematica equations to m... Nikola Nikod... 07/25/10 05:42am
Next Comment >Help | Reply To Topic