[Scilab-users] getting the first column of function

Samuel GOUGEON sgougeon at free.fr
Fri Nov 11 23:19:16 CET 2016


fujimoto2005, Oct 22, 2016; 5:28am wrote
> Function f returns m*2 matrix and I want to get the first column of f.
> The usual method is  as follows.
> 
> ***
> rt=f
> x=rt(:,1)
> ****
> 
> But I want to  get x directly from f without rt.
> Is there such method?

rt=f
does not call f, but makes rt an alias of f.
rt = f() // makes f returning a 2-column matrix: ok

What you wish is not possible with Scilab 5, while Scilab 6 allows doing it
as follows:
x = f()(1)

HTH
Samuel Gougeon




--
View this message in context: http://mailinglists.scilab.org/getting-the-first-column-of-function-tp4034849p4034965.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list