[Top][All Lists]

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

Re: Need help with structures and "eval" function

From: Thomas Walter
Subject: Re: Need help with structures and "eval" function
Date: Wed, 22 Mar 2000 14:55:36 +0100

>>>>> "John" == John W Eaton <address@hidden> writes:

    John> On 20-Mar-2000, A Scottedward Hodel <address@hidden> wrote:
    John> | Gerrit Visser <address@hidden> wrote:

    John> | >Is there some way I can either execute the "eval" command from a 
    John> | >(.oct) environment or to ask the octave session to evaluate it and 
    John> | >a result? I've seen something like this in the Matlab .mex method, 
    John> | >couldn't find anything usefull in the octave help. The source 
files for
    John> | >octave isn't much help either, as I do not have a month to trace 
all the
    John> | >classes / functions (probably a optimistic estimate of the time!)
    John> | 
    John> | I think you're looking for the feval function; look in the 
    John> | archives at

    John> Or one of the eval functions.  In the current sources, these are
    John> defined in parse.y.  In the 2.0.x sources, they are in

I'm interested too in how to do it.  To be more specific:

I have a sample function as m-file, but this can be any artificial
function that's why to use an m-file for the definition.
function y = myfunc (x, p)
  # x : a value  and   p : a vector with parameters
  y = p(1) * exp (- x / p(2));

Now the problem:  How to evaluate this function from within an .oct

I looked at 'parse.y' and some other files but I still have no idea
how to do it.


Warum hat eine Leiterbahn keine 90 Grad Winkel sondern 2 mal 45 Grad?
Weil die Elektronen sonst immer gegen die Wand laufen 8-)))

Dipl. Phys. Thomas Walter
Inst. f. Physiklische Chemie II
Egerlandstr. 3                          Tel.: ++9131-85 27326 / 27330
91058 Erlangen, Germany                 email: address@hidden

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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