SUNY Geneseo Department of Mathematics
Monday, September 28
Math 230 01
Fall 2015
Prof. Doug Baldwin
transpose
function>> v = 1 : 5
v =
1 2 3 4 5
>> v'
ans =
1
2
3
4
5
>> transpose( v )
ans =
1
2
3
4
5
max
has 2 results, value and positionsum
: compute the sum of all elements in a vectorprod
: compute product of all elements in a vector>> sum( v )
ans =
15
>> prod( v )
ans =
120
>> heights = [ 5*12+10, 5*12+7, 5*12+2, 5*12+10, 5*12+4, 5*12+11, 5*12+4, 6*12+1, 5*12+11 ]
heights =
70 67 62 70 64 71 64 73 71
>> mean( heights )
ans =
68
>> mode( heights )
ans =
64
>> mode( heights(end:-1:1) )
ans =
64
>> std( heights' )
ans =
3.8730