summaryrefslogtreecommitdiff
path: root/165/CH1/EX1.5/ex1_5.sce
blob: de951336e5e419af2b528f37605c0a8257ed2fba (plain)
1
2
3
4
5
6
7
8
9
10
11
//Example 1.5
clc;
d_dev=[];
Xn=[49.7,50.1,50.2,49.6,49.7];    //Given Data
X=mean(Xn);                       //Mean
for i=1:5
    d=Xn(1,i)-X;
    d_dev=[d_dev,abs(d)];
end
Davg=mean(d_dev);
disp(Davg,'Average deviation')