2014-06-29 14:47:59 -0600 | received badge | ● Popular Question (source) |

2014-06-29 14:47:59 -0600 | received badge | ● Notable Question (source) |

2014-06-29 14:47:59 -0600 | received badge | ● Famous Question (source) |

2013-11-13 09:49:04 -0600 | asked a question | help with a maxima function I have a number of maxima batch files (*.mac) for doing symbolic matrix work. I can sort of batch these in sage by calling maxima(line) for each line in the file. When I am done, I want to dump the results to a text file that I can convert to valid fortran code or code for numeric python evaluation using numpy and friends. Someone on the Maxima mailing list wrote a function for me for converting a Maxima expression to fortran code while collecting common sub expressions. However, I don't seem to be able to get this code to work with maxima. Here is the Maxima code: It is in my ~/.maxima/maxima-init.mac file and sage seems to load this file. I say that because under my tab completion options, I have a maxima.fortran_optimize. But the function doesn't do anything: Is there something else I need to do to get maxima to recognize this function from the sage maxima interface? Does the function need to be altered to get it to return the lines of fortran code? FYI, my maxima batch files end in lines like this for dumping the results to a file: with_stdout ("maxima_bode0.f", fortran_optimize (bode0)) Thanks, Ryan |

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.