function y = simpfun(x, z)
% SIMPFUN An example Matlab function.
%
% Y = SIMPFUN(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('Simpfun: Parameter Z size error.');
end
y = 0.5.*x + z;
| ©2004-2025 McGill University. All Rights Reserved. Maintained by Gary P. Scavone. |