SUNY Geneseo Department of Mathematics
Monday, February 29
Math 230 02
Spring 2016
Prof. Doug Baldwin
mean
, std
, median
,
mode
, max
, min
, range
>> % Vector of peoples heights
>> heights = [ 5*12+10, 5*12+7, 5*12+4, 5*12+6, 5*12+7 ]
heights =
70 67 64 66 67
>> mean( heights )
ans =
66.8000
>> sum( heights )
ans =
334
% Statistics on a matrix
>> m = [ 1, 2, 3; 4, 5, 6]
m =
1 2 3
4 5 6
>> mean(m)
ans =
2.5000 3.5000 4.5000
>> heightsAndAges = [ 60 18; 66 20; 70 69]
heightsAndAges =
60 18
66 20
70 69
>> mean(heightsAndAges)
ans =
65.3333 35.6667
% Find maximum of all heights and ages
>> max( heightsAndAges )
ans =
70 69
>> max( max( heightsAndAges) )
ans =
70
>> sum( sum( heightsAndAges ) )
ans =
303