Discussion1

Discussion1 - % CS 170A Discussion 1 % March 31, 2010 % TA:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
% CS 170A Discussion 1 % March 31, 2010 % TA: Elaine Wah % %------------------------------------------------------------------------- % Matrix Algebra %------------------------------------------------------------------------- % 1:5 % the row vector of values from 1 to 5 (1:5)' % the column vector of values from 1 to 5 linspace(1.3, 3.8, 6) % the row vector of length 6 w/ equispaced values of 1.3 to 3.8 3 v = [ 1 0 ] % a row vector (1x2 matrix) v' % a column vector (2x1 matrix) x = [ 1 ; 0 ] % a column vector (2x1 matrix) x.^2 % the column vector of squares of elements in x z = [ 1+2i ; 0-3i ] % a column vector of complex values z' % the corresponding complex conjugate row vector z v = [ 1; 2; 3 ] norm(v) % the vector norm of v norm(v,1) % the 1-norm (L1-norm) of v norm(v,2) % the 2-norm (L2-norm) of v norm(v,inf) % the infinity-norm of v n A = [ 1 2 ; 3 4 ] % a 2x2 matrix A * x % product of A with x x' * x % dot product of x with itself x A' % Hermitian transpose of A (complex conjugate of transpose
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/05/2010 for the course CS 170 taught by Professor Clancy during the Spring '00 term at UCLA.

Page1 / 2

Discussion1 - % CS 170A Discussion 1 % March 31, 2010 % TA:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online