Matlab User Defined Functions With Matrix