From: Matt J on
"m y" <ailojee(a)gmail.com> wrote in message <hhj8fm$r6c$1(a)fred.mathworks.com>...

> I want to look at function where you give input vectors and function command on the given input will result a vector.


Here's an equivalent example to what I had before, but where the input is passed to the function as a vector instead of each component separately:

>> f=@(xy) [xy(1)+xy(2) ; xy(1)-xy(2)] %A vector valued function of a vector argument

f =

@(xy)[xy(1)+xy(2);xy(1)-xy(2)]

>> f([1,2])

ans =

3
-1
First  |  Prev  | 
Pages: 1 2
Prev: 64b/66b encoding and scrambling
Next: Custom colormap