octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OctDev] Automatic code generation


From: Juan Pablo Carbajal
Subject: Re: [OctDev] Automatic code generation
Date: Fri, 4 Nov 2011 16:12:23 +0100

On Fri, Nov 4, 2011 at 3:40 PM, Martin Helm <address@hidden> wrote:
> Am Freitag, 4. November 2011, 15:23:28 schrieb Olaf Till:
>
>> What would be really useful IMHO would be converting the
>> representation of a function in Maxima into octave code. E.g. one
>> could create a system of ODEs in Maxima with some standard procedure,
>> pipe it through a converter and immediately use it in Octave for
>> simulation. This could probably yield part of the functionality some
>> (nonfree) software for mechanical simulation offers.
>>
>> Olaf
>>
> Such feature would probably be a good feature of maxima itself, which already
> provides for example the fortran() function to output fortran code.
> I already thought about an matlab/octave command, but my lisp knowledge is a
> bit too rusty at the moment to start coding something like that (but I have to
> admit that I think lisp is a very good language to achieve this and since you
> can add lisp functions to maxima I see a certain chance to make that work).
> Since I use myself maxima and octave I would be interested to work on that,
> but not before the new year starts.
>

Olaf, Martin,

This is indeed my motivating objective...Maxima and Sage.
Of course any of those languages can offer Octave output. but since I
am more proficient with Octave and python. I prefer to call Maxima and
Sage from Octave and read their output and convert it to functions.

@Olaf: for Maxima I developed a function that writes the equations of
motion of a planar Kinematic chain. Now it is time to convert it to
ODE compatible .m file.

However, I think that without much difficulty we could anticipate the
"generate M-code" feature for figures. That is, prepare the ground for
future development in that direction.

I have some basic functions that I use for interpolating data
(http://octave.1599824.n4.nabble.com/Output-function-td3847506.html#a3847624)
that I will use in many other programs and they can produce a handle
to the function or a file with the function in it. The only code
generating routine I have is this one (veeeeerrrry primitive)
http://agora.panocha.org.mx/snippet/HbQG/.

@Julio: I had two students doing evolutionary code generation in Java.
I guess the same can easily be done in Octave. Indeed quine programs
with Octave in mind would be great. Thanks!

-- 
M. Sc. Juan Pablo Carbajal
-----
PhD Student
University of Zürich
http://ailab.ifi.uzh.ch/carbajal/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]