Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Compile result of Solve command' topicStudent Support Forum > General > "Compile result of Solve command"

Next Comment >Help | Reply To Topic
Author Comment/Response
Axel Lachmeyer
07/05/13 03:45am

I want to use Mathematica to solve a rather complicated system of equations and turn the result into C-code that I can use in another C-program. Unfortunately, I am quite new to Mathematica and not quite sure about its syntax, so probably I am missing only a small thing and then my code will work.

Here is an easy example of what I am trying to do:

eqn = a + b + c ==0
res = Solve{eqn,a]
cfun = Compile[{b,c},res]
cfun[3.0, 4.0]
Something that works:
cfun = Compile[{b,c},-b-c]
cfun[3.0, 4.0]

Thanks for helping.

URL: ,

Subject (listing for 'Compile result of Solve command')
Author Date Posted
Compile result of Solve command Axel Lachmeyer 07/05/13 03:45am
Re: Compile result of Solve command jf 07/05/13 4:35pm
Re: Re: Compile result of Solve command Axel Lachmeyer 07/12/13 06:17am
Next Comment >Help | Reply To Topic