function [MAE]= mae(Y,X)
% MAE Computes the mean absolute error 
%
%   Y is the truth or reference, X is the estimate and the calculations 
%   assume Y and X are vectors. 
%
%   Nathan Steiger

X=X(:);Y=Y(:);
if length(X)~=length(Y);error('Inputs not equal length...');end

m = length(X);
err = X-Y;
MAE = sum(abs(err))/m;

end
