help-octave
[Top][All Lists]
Advanced

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

feval and inputname


From: Muhali
Subject: feval and inputname
Date: Fri, 14 Jan 2011 17:52:54 -0800 (PST)

For a=0, the function

function y = foo( x )
   y = inputname(1) ;
endfunction

correctly returns

octave:> foo(a)
ans = a
octave:> 

But using feval one gets

octave:> feval(@foo, a)
error: `argn' undefined near line 7 column 10
error: evaluating argument list element number 1
error: called from:
error:  
/usr/local/octave-3.4/share/octave/3.3.54+/m/miscellaneous/inputname.m at
line 31, column 7
error:   foo.m at line 2, column 6
octave:> 

matlab also returns an error here. Is it possible to adapt inputname for the
use with feval?

M.
-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/feval-and-inputname-tp3218641p3218641.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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