[Scilab-users] varargout doubt

Samuel Gougeon sgougeon at free.fr
Tue Nov 8 20:59:15 CET 2016


Le 08/11/2016 20:41, Samuel Gougeon a écrit :
> Hello Shamika,
> .../...
> Le 08/11/2016 06:47, Shamika Mohanan a écrit :
> .../...
> Now when I call this function with [c,d]=callOct("butter",8,0.1), I 
> get no error.
>>
>> I need callOct function to work with any number of output arguments 
>> and so I need to use varargout. How do I get the function to work 
>> with varargout?
> .
> To answer, you must provide information about how you define 
> callOctave(fname,varargin):
> Does it use also varargout, or not?
.
Here is an example:

function  L= test()                     // using a simple list not named varargout as single argout does the job
      L  =  list(%z,  %pi,  %t,  "abc")
endfunction

function  varargout= main()
     varargout  =  test()
endfunction -->[a,b] = main()b =3.1415927 a =z -->[a,b,c] = main()c =T b 
=3.1415927 a =z Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161108/be284afc/attachment.htm>


More information about the users mailing list