math tools for neuroscience neu 314 spring 2016
play

Math Tools for Neuroscience (NEU 314) Spring 2016 Jonathan Pillow - PowerPoint PPT Presentation

Math Tools for Neuroscience (NEU 314) Spring 2016 Jonathan Pillow Princeton Neuroscience Institute & Psychology. accompanying notes/slides for Thursday, Feb 4 discussion items course website:


  1. Math Tools for Neuroscience (NEU 314) Spring 2016 Jonathan Pillow Princeton Neuroscience Institute & Psychology. accompanying notes/slides for Thursday, Feb 4

  2. discussion items • course website: http://pillowlab.princeton.edu/teaching/mathtools16/ • sign up for piazza. • take math-background poll • for Matlab newbies: • check out MATLAB for neuroscientists (Lewis Library), chapter 2 • either of the matlab tutorials posted on course website (just first part, up through vectors & matrices). 
 • Today: “ Intro to linear algebra: vectors and some of the basic stuff you can do with ‘em.” • Next week: start of labs!

  3. today’s topics • vectors (geometric picture) • vector addition • scalar multiplication • vector norm (“L2 norm”) • unit vectors • dot product (“inner product”) • linear projection • orthogonality

  4. vectors v v 3 v 1   v v 2 v 2   v 2 � v = .   .   v v . 1 1   v N v N 1 v 2 v

  5. column vector in matlab v 1   % make a 5-component v 2 % column vector   � v = .   .   . v = [1; 7; 3; 0; 1];   v N transpose % transpose v' % create row vector by row vector % separating with , % instead of ; v = [1, 7, 3, 0, 1];

  6. addition of vectors v translated w w v � v

  7. scalar multiplication v 2 v v

  8. vector norm (“L2 norm”) • vector length in Euclidean space v v 2 In 2-D: In n -D: v 1

  9. 
 
 vector norm (“L2 norm”) in matlab v = [1; 7; 3; 0; 1]; % make a vector % many equivalent ways to compute norm norm(v) sqrt(v'*v) sqrt(v(:).^2) sqrt(v(:).*v(:)) 
 % note use of .* and .^, which operate % 'elementwise' on a matrix or vector

  10. unit vector • vector such that v v 2 • in 2 dimensions v 1 unit circle

  11. unit vector • vector such that • in n dimensions • sits on the surface of an n -dimensional hypersphere

  12. unit vector • vector such that • make any vector into a unit vector via

  13. inner product (aka “dot product”) • produces a scalar from two vectors w φ vw v b � b . v . w v . w w

  14. linear projection • intuitively, dropping a vector down onto a linear surface at a right angle • if u is a unit vector, length of projection is 
 v ^ u ^ ( . ) v u ^ u • for non-unit vector, length of projection =

  15. linear projection • intuitively, dropping a vector down onto a linear surface at a right angle • if u is a unit vector, length of projection is 
 v ^ u ^ ( . ) v u ^ u } component of v in direction of u • for non-unit vector, length of projection =

  16. orthogonality • two vectors are orthogonal (or “perpendicular”) if their dot product is zero: v component of v orthogonal to u ^ u ^ ( . ) v u ^ u } component of v in direction of u

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend