% average.m
% function [y1,...,yN] = myfun(x1,...,xM) declares a function named 
% myfun that accepts inputs x1,...,xM and returns outputs y1,...,yN.


%%
function y = average(x) % 
    if ~isvector(x)
        error('Input must be a vector')
    end
    y = sum(x)/length(x); 
end


%%Call the function from the command line.
% z = 1:99;
% average(z)


