%statistical measure

a=[1,2,3;4,5,6;7,8,9];

%find the variance and standard deviation

MyMean = mean(a(:));

MyVar=0;

for i=[1:9]
    MyVar=MyVar+power((a(i)-MyMean),2);
end

MyVar=MyVar/8;
str=sprintf('My Variance = %d',MyVar);
disp(str);


MyDev=power(MyVar,0.5);
str=sprintf('My Deviation = %d', MyDev);
disp(str)

