Hi all,(adsbygoogle = window.adsbygoogle || []).push({});

here is a question for mathematica experts(or not )

I have an expression of the form:

-6615. y[0] + 282.72 y[0]^3 + 1.3244 y[0]^5 - 0.002624 y[0]^7 -

178.28 y[1] + 152.912 y[0]^2 y[1]-((1309.5 y[0]^3 y[1]^4)/(y[0]^2 + y[1]^2)^4)...

and I want to transfer this expression to my C++ code.

I need a way to transform for example this: y[0]^5(and anything similar) into this pow(y[0],5) to copy and paste in my code(I cant do it manual because the expression is quite large). Is it plausible?

thanks

PS. I tried CForm. It does a good work but it changes [ and ] to ( and ).

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica question

Loading...

Similar Threads - Mathematica question | Date |
---|---|

Simple Mathematica question | Mar 23, 2015 |

Quick Mathematica Question | Oct 3, 2014 |

Mathematica : Pulling inputs from a function; methodology question. | Jan 3, 2014 |

Mathematica derivation Question | Sep 10, 2013 |

Mathematica question | May 4, 2012 |

**Physics Forums - The Fusion of Science and Community**