[Scilab-users] Accessing the nth output of a function
Jan Åge Langeland
j-lan at online.no
Mon Jan 11 00:05:15 CET 2016
It may not solve your problem, but in Scilab 6 you can at least access
the nth element of the first output argument.
--> function c=a(b)
> c(1)=b
> c(2)=b^2
> c(3)= b^3
> endfunction
--> a(2)(2)
ans = 4.
Another solution could be like it is done in size(), where an extra
input argument can be used to point at the correct output argument:
d =
1. 2. 3.
4. 5. 6.
--> size(d)
ans = 2. 3.
--> size(d,1)
ans = 2.
--> size(d,2)
ans = 3.
JÅ
On 10.01.2016 16:52, animeshbaranawal wrote:
> I have a function which has variable output arguments (using varargout). Now,
> I want to access the nth output argument of the function. It is assured that
> the function generates more than n output arguments.
>
> Is there a method in scilab to do this?
>
> Animesh
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160111/7b5658b5/attachment.htm>
More information about the users
mailing list