%% Declare Function
% Declare a function in a file named |average.m| and save it in the current
% folder. Use |end| to terminate the function.
%
% <include>average.m</include>

%%
% The function accepts an input array, calculates the average of its
% elements, and returns a scalar. Call the function from the command line.
z = 1:99;
ave = average(z)
%%
% Copyright 2019 The MathWorks, Inc.