Matlab Commands PDF

Title Matlab Commands
Course Linear Algebra
Institution University of Melbourne
Pages 2
File Size 182.4 KB
File Type PDF
Total Downloads 30
Total Views 154

Summary

Commands to help with matlab tests and assignments...


Description

MATLAB COMMANDS COMMAND A’ B(1,2) = 13 B (1,2) v=B(:,2) v=B(2,:) 2:8

1:0.2:2

Eye(4) Ones(6,3) Ones(3) Zeros(4,1) Diag(v) Rref(B) [A b] Scatter(xvalues, yvalues) Fplot(@(x)polynomial) Fplot(@(x)polyniomial,[4,-4]) Format rat Format Inv(A) Det(A) [B,E]=rowswap(A,i,j)

[B,E]=rowmul(A,c,i) [B,E]=rowadd(A,c,i,j) Dot(x,y) Cross(x,y) Pgram1(B) Pgram2(B,C)

B=[u;v]

WHAT IT DOES AT : transverse of A Changes the entry in row 1, column 2 of B to 13 Gives the entry in row 1, column 2 of B Defines v as the second column of B Defines v as the second row of B Outputs 2 3 4 5 6 7 8 Outputs numbers from 2 to 8 with difference of 1 Outputs 1 1.2 1.4 1.6.1.8 2 Outputs numbers 1 to 2 with difference of 0.2 4x4 identity matrix 6x3 matric with all entries 1 3x3 matrix with all entries 1 4x1 matrix with all entries 0 Puts entries of v in a diagonal matrix (where the other entries are 0) Reduced row echelon of B Augmented matrix for solving equations [A|b] Creates a scatter graph Xvalues/yvalues as row matrix [] Plots the polynomial (eg. x^2) Plots the polynomial with domain of [4,-4] Fractions are used Decimals are used A-1: Inverse of A Determinant of A Swaps row i and row j in matrix A B will be the new matrix and E will be the corresponding elementary matrix (identity matrix with rows i and j swapped) Multiplies row i of A by c Adds c x row i to row j of matrix A Dot product Cross product Draws parallelogram with sides as vectors in B Draws 2 parallelograms with one with sides of vectors in B and the other with sides as vectors in C Puts defined u and v as columns

linspan -4.1633e-16 = 0 Abs(x) Max(abs(x)) Drawvec1(x,’b’,m) rand Mod(1+1,2) Rrefmod2(A) Plot2dd(S*x) [P,D] = eig(A)

Sum(w)

GUI (graphical User interface) for determining linear combinations and span zero Absolute Maximum value of all the entries ‘b’ determines colour of vectors M gives limits of the axes Generates random numbers between o and 1 Calculates 1+1 using mod 2 arithmetic Reduced row echelon of A using mod 2 arithmetic Applies transformation S to the vector x and graphs it P gives eigenvectors as columns D gives diagonal matrix with corresponding eigenvalues Sum of the entries in the unit length eigenvector w...


Similar Free PDFs