help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Aux. functions with multiple outputs


From: Mike B.
Subject: Re: Aux. functions with multiple outputs
Date: Thu, 9 Sep 2010 20:09:25 -0700 (PDT)

Thanks but it doesn't work.
y(1) gives the first scalar element of the first output.
I need to refer to the 2nd output.


--- On Fri, 10/9/10, Doug Stewart <address@hidden> wrote:

> From: Doug Stewart <address@hidden>
> Subject: Re: Aux. functions with multiple outputs
> To: address@hidden
> Cc: "Octave mai. lis." <address@hidden>
> Date: Friday, 10 September, 2010, 12:02 PM
> On Thu, Sep 9, 2010 at 9:55 PM, Mike
> B. <address@hidden>
> wrote:
> > Hi All,
> >
> > Is it possible to define an aux. function which
> handles multiple outputs?.
> >
> > For example, for a single output:
> > function [ a ] = f1( x )
> > ...
> > endfunction
> > y = @(x) f1( x );  # aux. function, single output
> > sin( y )
> >
> > However if f1 returns multiple outputs:
> > function [ a,b ] = f1( x )
> > ...
> > endfunction
> >
> > how do I define y so I can refer to a and b?.
> >
> > Thanks,
> > Mike.
> >
> >
> >
> >
> > _______________________________________________
> > Help-octave mailing list
> > address@hidden
> > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
> >
> 
> 
> Try
> y(1)
> and y(2)
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]