<div dir="ltr"><div><div><div><div><div><div><div><div><font size="2">Hello,<br><br></font></div><font size="2">I have a function defined as such<br><br><span style="font-family:monospace,monospace">function varargout= callOct(fname,varargin)<br>    varargout=list(callOctave(<wbr>fname,varargin))<br>endfunction </span><br><br></font></div><font size="2">When I call this function with <span style="font-family:monospace,monospace">[c,d]=callOct("butter",8,0.1)</span>, I get the error <br><span style="font-family:monospace,monospace">!--error 21 <br>Invalid index.</span><br><br></font></div><div><font size="2">If I call the function as </font><font size="2"><span style="font-family:monospace,monospace">c=callOct("butter",8,0.1),</span><span style="font-family:arial,helvetica,sans-serif"> I get no error.</span><span style="font-family:monospace,monospace"> varargout </span><span style="font-family:arial,helvetica,sans-serif">stores only one o/p argument even though callOctave returns two arguments.<br><br></span></font></div><font size="2">If I remove <span style="font-family:monospace,monospace">varargout</span> like this<br><br><span style="font-family:monospace,monospace">function  [b,a]=callOct(fname,varargin)<br>    [b,a]=callOctave(fname,<wbr>varargin)<br></span></font></div><font size="2"><span style="font-family:monospace,monospace">endfunction</span><br><br></font></div><font size="2">Now when I call this function with <span style="font-family:monospace,monospace">[c,d]=callOct("butter",8,0.1)</span>, I get no error. <br><br></font></div><font size="2">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?<br><br></font></div><font size="2">Regards,<br></font></div><font size="2">Shamika<br></font></div>