[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: |
Fri, 10 Sep 2010 03:22:30 -0700 (PDT) |
Thanks for replying.
How do I refer to each of the outputs (a and b in the example)?.
Mike.
--- On Fri, 10/9/10, Francesco Potortì <address@hidden> wrote:
> From: Francesco Potortì <address@hidden>
> Subject: Re: Aux. functions with multiple outputs
> To: address@hidden
> Cc: "Octave mai. lis." <address@hidden>
> Date: Friday, 10 September, 2010, 5:46 PM
> >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?.
>
> There is no difference. You should assign y in
> exactly the same way:
> y = @(x) f1( x );