Introduction.
This assignment will introduce you to the lab environment we will use this semester. We will be using Matlab as a computational language. MatLab is a general-purpose scientific computing language. We will use it in many ways in this course, but for this lab, we will do calculations and make plots of data.
Make yourself a folder in the directory c:\My documents\.
Put
all files which you may generate or download into the folder you make. You will
share the account with the other students in 442.
Download the contents of Voltage12Aug2000.mat
by right-clicking on the link and choosing the Save Link As...
option. Be sure to save it in your own folder. This is a data file.
Download this AP.MAT containing a few seconds of extracellular recordings from the midbrain of a fish. The file has voltage readings taken at a rate of 10000/sec for 5 seconds. Plotting the data file should convince you that the signal-to-noise ratio is good enough to identify action potentials by an amplitude threshold.
The following code moves a dot around a circle. You will need this for part of the assignment below.
figure(1) clf set(gcf,'doublebuffer','on') %draw a circle t=0:.01:2*pi; x = cos(t); y = sin(t); plot(x,y) hold on %draw one dot dotH = plot(x(1),y(1),'ro') %move the dot for i=1:length(x) set(dotH, 'xdata',x(i), 'ydata',y(i) ) drawnow end
Assignment
Voltage12Aug2000.mat
contains two vectors: time
and voltage. Using the Matlab command:load c:\yourpath\Voltage12Aug2000 t v ;
t
and
v
. The phrase 'yourpath
' above represents the path
of file folders in which which you stored your copy of the file. If I were
writing the command, I would writeload 'c:\my documents\bruce\Voltage12Aug2000' t v ;
v
versus t
and answer the
questions below. Using tools from the matlab figure Insert
menu,
place arrows pointing to threshold and maximum undershoot, then label them
with text.v
with respect to t
(use
diff
function), then plot dv/dt
versus t.
dv/dt
versus v.
On the plot of
dv/dt
versus v,
use the Matlab arrow tool
to draw an arrow indicating threshold.dv/dt
versus v
plot, make a moving red
dot which follows the time evolution of the curve. Make the dot move no faster
than 20 frames/sec. load c:\yourpath\ap wave ;
to load the data. Use help hist
to see how to make a histogram. Estimate the average frequency of firing.Your written lab report should include:
v
versus t
plot. dv/dt
versus t
plot represents
the maximum current. At what voltage does this occur?