Matlab Function With Array Input And Output