Function
Define Function
function [a, b] = change(a, b)
    nargin % number of input parameters
    a = a+1;
    b = b+1;
    nargout % number of output parameters
end
			
function test()
    a = 1; b = 10;
    [c, d] = change(a, b);
    a
    b
    c
    d
end
		
Anonymous Functions
power = @(x, n) x.^n
a = 1:10
b = power(a, 2)
		
Reference