MATH319 Slides

165 Appendix: MATLAB commands for matrices

x=3, t=2 [this assigns values x=3 and t=2

x*t [multiply x and t]

x+t [add x and t]

x/t [divide x by t]

x ^(-1.5) [raises x to the power -1.5]

2*((x+t)^ 3) [computes 2(x+t)3]

pi [π area of disc of unit radius]

j [i complex number]

exp (3); [creates e3]

A=[5,7; 9,-2], B=[1,2,3;4,5,6] builds the matrices

A=[579-2],B=[123456]

inv(A) [computes the inverse matrix of A]

det(A) [computes the determinant of A]

trace(A) [computes the trace of A]