function [mea, vari] = statistic( x )

% [mea, vari] = statistic( x )
%
% The function returns the mean and the standard deviation
% of the input vector.
%
% INPUT: x vector of numbers. Do not use with matrices.
% OUTPUT: mea = is the mean of the input vector x
% vari = is the variance of vector x
% Author: Borgo, Soranzo, Grassi 2010

Nelem = length(x);
mea=sum(x)/Nelem;
vari=sum(x.^2)/Nelem;