Hello,
As answered by Christophe, you shall use deff(..).
In Scilab, all functions are somewhat anonymous, in the way that their
names are "handles"
that some functions may accept as is (functions names are some variables
with specific types).
Some examples:
deff("y = what_do_you_want_to_do(action, param)", "y = action(param)")
-->what_do_you_want_to_do(sqrt, 2)
ans =
1.4142136
-->what_do_you_want_to_do(max, [2 -1 3 0])
ans =
3.
-->what_do_you_want_to_do(min, [2 -1 3 0])
ans =
- 1.
It is possible to make aliases of functions as of variables:
-->quadratwurzel = sqrt
-->quadratwurzel(2)
ans =
1.4142136
and so on.
HTH,
Samuel
Le 12/05/2014 20:27, Patrick Seeboerger a écrit :
Dear Sir or Madame,
I am starting to use Scilab instead of Matlab more and more so I have
to translate
some code from a Matlab M-file into Scilab.
So when I write an argumental function in Matlab I can write it for
example like:
U_q=@(f_u) k_U*2*pi*f_u;
Now my question:
Which operator do I have to use in Scilab instead of =@ ?
Thank you,
Best regards,
Patrick Seebörger
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users