matrix a = [1, 2, 3; 4, 5, 6] answer is surrounded by ! symbols ! 1. 2. 3. ! ! 4. 5. 6. ! sum(a, 'c') adds the terms along each row? ! 6. ! !15. ! sum(a, 'r') adds the terms along each column? ! 5. 7. 9. ! diag(a) the entries along the diagonal ! 1. ! ! 5. ! rref(a) row reduce ! 1. 0. - 1. ! ! 0. 1. 2. ! subscripts with ( , ) a(2,3) yields 6 assign 8 a(2, 3) = 8 ! 1. 2. 3. ! ! 4. 5. 8. ! colon 1:10 ! 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. ! 10:-2:0 ! 10. 8. 6. 4. 2. 0. ! a(1:2,3) gives the 3 column So does a(:, 3) conjugate transpose a' a*a' or a'*a inverse b^(-1) b^n power sqrt(-1) is %i, %pi is pi, %e is e, %inf is oo, %t is true abs is complex abs value zeros(3,4) ones(3,4) eye(3,3) rand(3,4) concatenation a = [1, 2;3, 4]; b=[2, 0;0,2]; augment is [a, b] plot(x,y) x = 0:0.05:2*pi y =sin(x) det(a) determinant inv(a) inverse the dot operators .* not equal is ~= spec is spectrum [v,d]=spec(a) real(a+b*%i) is `a' imag(a+b*%i) is `b' abs(a+b*%i) is sqrt(a^2 + b^2)