CO SCI 136 Lecture Notes - Lecture 13: Distance Matrix, Graph Drawing, Centrality

6 views5 pages
4 Nov 2020
School

Document Summary

Matrix algebra v = [ 1 2 3 ] horizontal vector v = [ 1 ; 2 ; 3 ] vertical vector s = start:step:end. A = [ 1 2 ; 3 4 ] sequence matrix z = zeros(nrow,ncol) matrix/vector of zeros ones(nrow,ncol) matrix/vector of ones d=diag(a) main diagonal vector. *b trace(a) det(a) size(a) length(a) spy(a) transpose inverse matrix multiplication component-wise multiplication trace determinant dimension nxn just n sparsity pattern of a. A( : , 2) rows 1-10 from column 2 all rows from column 2 isequal(a,a") clc clear ans. Logical operators and or not returns 1 if true or 0 if false smaller or equal greater or egual. Other useful commands clears the command window clears workspace temporary variable commenting help command gets info on a command. A = full(a) changes sparse into full matrix eig(a) eigs(a) Spectrum eigenvalues only some eigenvalues (for large a)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents