SUNY Geneseo Department of Mathematics
Wednesday, October 14
Math 230 01
Fall 2015
Prof. Doug Baldwin
\
) solves systems of linear equationsM = [ 2 -1; 1 1 ]
M =
2 -1
1 1
S = [5;6]
S =
5
6
M\S
ans =
3.6667
2.3333
a * b
requires a to have same number of columns as b has rowsrand
function builds n row by m column matrix of
random numbers between 0 and 1randi(iMax)
generates random integer from 1 to iMaxm = rand( 3, 4 )
m =
0.8147 0.9134 0.2785 0.9649
0.9058 0.6324 0.5469 0.1576
0.1270 0.0975 0.9575 0.9706
max( m )
ans =
0.9058 0.9134 0.9575 0.9706
max( max(m) )
ans =
0.9706
m^2
) do?s = [ 2 3; 4 5 ]
s =
2 3
4 5
s ^ 2
ans =
16 21
28 37