On 18/02/2013 20:52, fitzyfish wrote:
Is there a Scilab equivalent for the MATLAB function handle @ to call a
function indirectly e.g.
sqr = @(x) x.^2;



--
View this message in 
context:http://mailinglists.scilab.org/Indirect-function-call-tp4025965.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users
I am not sure I understood what you want to do with such a handle, but you can always store functions in a variable to get something like a callback function that you can change on the fly:

f_callback=sqrt;
this_is_two=f_callback(4);
f_callback=sin;
this_is_one=f_callback(%pi/2);

Hope it helps,

Antoine
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to