Beruflich Dokumente
Kultur Dokumente
This is an individual project. Rules for interaction with your fellow students are
the same as any individual assignment.
Background: In this project you will be working with neurological data collected inside a
subject’s brain. This data has 3 channels and 25,000 values that represent the
microvoltages at the cellular level (neuronal) (Figure 1). You will use what you have
learned to summarize the information contained in these three channels using plotting and
data analysis.
In the assignment section of Carmen you will find the necessary data for this project
(file: neuronData.xlsx). The data array contains 3 columns of 25,000 values each.;
each column contains the data from one microelectrode. These 25,000 samples were
taken in a span from 0 to 1.3 seconds.
Task 1: Write a function to plot the 3 channels of data on a single graph using a
subplot
Function Specification
Input Arguments:
Make a summary plot showing the three different channels with the shared time axis
(hint: use a subplot). The channels should be properly labeled showing the date of the
recording (Channel 1 – 3/16/17, Channel 2 – 3/20/17, Channel 3 – 4/07/17), the units
(mV), and using a combination of the max function and the text function to find which
action potential has the largest amplitude. Example below in figure 2:
A researcher might be interested in looking more closely at said action potential and
look at its profile to characterize it better. In the same subplot, add a zoomed in version
of this action potential (hint: instead of creating a 3x1 subplot, create a 3x3 subplot and
use the blocks 1x3, 2x3, and 3x3 for your zoom). In order to zoom into a subset of your
data, you only need to set your axis to the desired field of view. Your finished result
should look something like this:
Function Specification
Input Arguments:
Output Arguments:
A 1x3 array with the number of spikes above the threshold value in each
channel
A 1x3 array with the average peak height in each channel
A 1x3 array with the maximum peak height in each channel
A 1x3 array with the average time between spikes
A 1x3 array containing the correlation coefficient for each pair of
channels, in the following order: (1,2), (1,3), (2,3). The correlation
coefficient is defined below.
For example, if the function is called analyze_spikes, and the sampling interval is 10
microseconds, a call might look like this:
To find the number of peaks above the threshold, you can use the Matlab built-in
function findpeaks(), for example:
This function will give you the peaks in a recording that are above 1 unit of measure (in
this case mV); peak_vals is an array containing the maximum value of each peak,
and peak_ind is an array containing the index at which each peak value occurs.
Correlation is a measure of how likely two neurons are to fire at the same time. For
purposes of this project, the correlation between two channels is calculated in the
following (simplified) manner:1
1
This is not the same as the formal definition of correlation coefficient in statistics; it is a simplified measure that
we created for this project.
For each peak in the first channel, if the second channel is above
threshold at the time of that peak, the overlap for that peak is 1;
otherwise it is zero
The correlation between channels i and j is then defined as:
(Sum of overlaps of chan j with chan i)*(Sum of overlaps of chan i with chan j)
The degree of correlation will depend on the threshold value; the higher the threshold,
the lower the correlation. Note that if i and j are the same channel, the correlation is
1.0.
While this calculation may sound complicated, it can be done in one line in Matlab with
logical array operations.
Notice that the correlation between channels i and j is always the same as between
channels j and i.