You are on page 1of 11

MATLAB tutorial

online version

Methods in Computational Neuroscience
Obidos, 2004
Thanks to Oren Shriki, Oren Farber
and Barak Blumenfeld
Capabilities
• Numerical calculations. Matrix manipulations.
MATLAB = MATrix LABoratory
• Data Analysis
• Data Visualisation
• Simulations
Neuronal models
Network models
• Analytical calculations
• User interfaces
• ....
• ....
Starting MATLAB

• Desktop Demo

type demo matlab desktop in the prompt ,and then start a „desktop
environment“ demo
First steps. Learning by doing

• Matrix Manipulations
Data analysis

• Importing Data

type demo matlab desktop in the prompt ,and then start a „importing
data“

• Data Analysis Demo
• Interpolation Demo
3-D plots

• Mexican hat function 0.1

0.05
 |r | /  E  |r | /  I
f ( r )  AE e  AI e
0

-50 -25 0 25 50
Poisson spike train generator

• Exercise 3

Spike times: ti

Interspike interval distribution: P[τ ≤ ti+1 - ti < τ +Δt] = rΔt exp(rτ).

Formula for generation: ti+1 = ti - ln(xrand)/r.
dr
 ref  r0  r
Relative refractory period: dt
T
1
Q ( )   dt (  (t )  r )(  (t   )  r )
Autocorrelation function T 0
n
 ( )    (t  ti )
i 1
Ring neural network model

 
 m i   m i  g   Jij m j  g(x)
 y 
T
J ij  J 0  J 2 cos[2( i   j )]

• Weak coupling with homogeneous input
• Weak coupling with noisy tuned input
• Strong coupling with noisy tuned input
• Strong coupling with nonspecific input
Orientation maps
Orientation maps
0

n
  2 i k
z x    fk  x  e 135

k 1

  2 i 90

z x   z x  e
45

Preferred orientation φ

z x 
0
Selectivity
2-D network of visual cortex
(courtesy of Barak Blumenfeld)

 
 m  x    m  x   g   J  x, y  m ( y ) g(x)
 y 
T

J  x, y   J 0  J 2 | z ( x ) |  | z ( y ) | cos  2   ( x )   ( y )