[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Aux. functions with multiple outputs
From: |
Francesco Potortì |
Subject: |
Re: Aux. functions with multiple outputs |
Date: |
Fri, 10 Sep 2010 09:46:02 +0200 |
>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 );
--
Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR Fax: +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa Email: address@hidden
(entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it/