function y = dumbfun(x, z)
% DUMBFUN  An example Matlab function.
%
%   Y = DUMBFUN(X,Z) doesn't do much.  The Z parameter is optional
%   and should either be a scalar or equal in size to X.
%
%   By Gary P. Scavone, McGill University, 2004.

if nargin == 1
  z = 0;
end

if numel(z) ~= 1 && max(size(z) ~= size(x))
  error('Parameter Z size error.');
end

y = 0.5.*x + z;
