Sale!

# AMATH 342 HW 1 solved

Original price was: \$30.00.Current price is: \$25.00.

Category:

## Description

Rate this product

## I. MATLAB Tutorial

No experience in programming is required or expected to succeed in and enjoy the course. The
Matlab tutorial should get you up and running! Work through it, typing in all the courier
font parts and running them as you go through, and – for your own learning – working all of
the exercises (you might want to save these scripts yourself for future refefnce).

I will only assign a few problem below – again, if you have no prior experience you will need to
go through the tutorial to do them, and if you do, we will be assuming fluidity with all of the
tutorial in future weeks so make sure you’ve gone through it all! We want to make sure everyone
is up to at least the level of this tutorial by the next class statements.
If statements Exercise 4.1
For loops Exercise 3.2
Functions Exercise 5.1

## II. Spike train analysis and tuning curves

In these exercises you will be confronting one of the core problems faced by neuroscientists
everyday.
• How do I stimulate the nervous system?
• How do I parameterize that stimulation?
• How do I interpret responses of neuron with respect to my chosen parameters?

We will be simulating a simple example: a hair from the cricket cercal ganglion discussed in
class. We will be delivering stimuli to the neuron in the form of deflections to the hair it
innervates, and we will parameterize that stimuli as theta (direction in which we deflect) so the
first two problems are settled, you will be attempting to solve the last: how do I now interpret the
responses of the cell!

These cells will generate spikes via (inhomogeneous) Poisson processes (see lecture and
textbook!), so you will also gain experience dealing with binary spike data with strong variability
(or “noise”) from one moment in time to the next, and from one trial to the next.

On the website you will find, among the posted codes, the following two short matlab codes:
generate_noisy_data_cockroach.m and cockroach_tuning.m. If you save them in the same
directory and type generate_noisy_data_cockroach, you will be able to run an experiment giving
you n trials of a 300 ms spike train in response to your input direction for one of three cells.

You will be prompted to enter both the cell you want to simulate recording from (1, 2, or 3) and
the direction of the stimulus. Think of the input stimulus as the direction in which you are have
deflected a cockroach spine (analogous to a hair from the cricket cercal ganglion discussed in
class), measured in degrees, and use values between 0 and 90.

You can ask for as many repetitions – in other words, as many trials — as you like. The data will
be in the variable “spiketrain” and will consist of a matrix of trials, each of which has millisecond
timebins which are either zero if there was no spike in that bin, or one if there was.
1. Try looking at the first cell response (i.e., choose cell 1) and getting a number of repetitions for

Use MATLAB plotting routines to examine the responses you’ve received. For each cell, make
several plots that describe the response of each cell for a few different fixed stimuli, and describe
each plot in few sentences. Make sure your plots are labeled completely, sized legibly, etc.

* Use the command imagesc(spiketrain).
This will make a “raster plot” (albeit with colors that you could improve): “bars” at the time of
each spike, with each row being a trial and each column being a time point.
(throughout, use figure and subplot to make a clear and rich summary of your findings)
* Compute the trial-averaged spike count rates (see text) from your raster plot: Use the “sum”
command to figure out the total spike count over each trial. Normalize that by the time interval
over which the recordings are made.

* Use the mean (mean) command to compute the average firing rate across trials, and the
standard deviation command (std) to make sure you have enough trials to draw meaningful
2. Examine the time course of your raster plots from the imagesc command more carefully. Do
the firing rates appear to be constant over the trial or varying? Describe how the rates change
over time by making a clear and informative plot, and in a sentence or two. This is a (very
simple) example of neural adaptation to stimuli.

3. Now that we have a sense for the responses at one direction we want to vary our stimulus to
get a sense for the cell’s tuning: how the cell’s responses change as a function of the stimulus
parameters we’ve chosen.

To do this, plot the tuning curve of the trial-averaged spike count rate, with error bars showing
standard deviations across trials, as a function of stimulus direction. Repeat this for all 3 cells.
Describe and compare what you see for each of the 3 cells in a few sentences. Make sure you
carefully observe for each cell whether ‘preferred orientation’ is a sufficient description of the
cells preferences.

### Optional hint:

One useful function in doing this could be ‘cat(3, array_one, array_two)’ this
could help put together your response matrices for each direction along a third dimension. You
could then sum along the 1st and 2nd dimension to get how many spikes there were for each
direction.