
x = input('entire array: ');
[r,c] = size(x);
n = c;

sum_x = sum(x(1:n));
sum_x2 = sum(x(1:n).^2);

x_bar = sum_x/n;
sd = sqrt((n*sum_x2 - sum_x^2)/(n*(n-1)));

fprintf('Mean: %f\n', x_bar);
fprintf('SD:   %f\n', sd);
fprintf('Count:%f\n', n);

