[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Matlab vs Octave
From: |
Frederic Gobry |
Subject: |
Re: Matlab vs Octave |
Date: |
Tue, 13 Jul 1999 12:43:51 +0200 |
> After that, this function is used in ga program:
>
> bxtX= ga([0 10: 0 -10], 'gaDemo1Eval')
>
>
> It seems to be calling the evaluation function. Does anybody know how to
> translate that to Octave ?
So far, nothing special occured, as the parameter to ga () is the name (as a
normal string) of the function. Inside ga () you probably have a feval ()
function. To call a function whose name is stored in funcname, you can write
something like :
function ga (argument, funcname)
feval (funcname, argument);
endfunction
If you have a variable number of additional arguments for the subfunction,
you can try :
function ga (argument1, funcname, ...)
feval (funcname, argument, all_va_args);
endfunction
Then, ga (1, 'gronf', 2, 3) will call gronf (1, 2, 3)
Hope this helps,
Frédéric
--
Frédéric GOBRY IDIAP
Rue du Simplon 4,
Research Assistant CH 1920 - Martigny
Machine Learning Group Tel: +41 27 721 77 31
---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL. To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------
- Matlab vs Octave, Bostjan JERKO, 1999/07/13
- Re: Matlab vs Octave,
Frederic Gobry <=