Wednesday, October 04, 2006

Matlab warm up

I'll send you a file. Please download it. It is a .mat file consisted one variables named spikes1 which is a matrix of 5X500 zeros and ones. It is response of an IT cortex neuron to an image. The image is presented five time for 500 ms. So, the data you have in your hand consisted of 5 trials (rows) and 500 bins of one millisecond (columns). Ones in matrix means existence of one spike, zero means there is not any spike in that time bin.
So, download the files and have fun with exercises. Remember! It is not enough to know how to do the exercises. you should be able to do these in front of your friends in next session. If you have read the chapter 5 of mastering matlab book, these would be a piece of cake for you.


1- Show the first 100 ms of the first trial.
2- Show the last 100 ms of the first trial.
3- Show the window between 100 ms and 200 ms of the third trial.
4- Reverse the order of first trail from 500 to 1 ms and put it in another array.
5- Show the content of bins: 1, 4, 100, 400, 300, 2, 75, 500 in trial one.
6- How many spikes exist in the bins above (use Sum command)?
7- What is the probability of spiking in above bins?
8- Show the contents of even times (2,4,6, ...) in first trial.
9- Show all the spikes fired during the 130 ms bin across all trials.
10- How many spikes exist in 130 ms bin across all trials?
10- what is the probability of spiking during 130 ms bin across all trials?
11- How many spikes exists in a 100 ms window from 120 ms to 220 ms across all trials?
12- What is the probability of spiking in that window?
13- Show the time bins that there was a spike in them in second trial (e.g. [10,20,35,40 ...]).

And ... improvise some exercises until you can do these kind of thing with your spinal cord reflexes!

No comments: