Homework 4 Computational Neuroscience  Spring 2020  Pyzza Name: Type Your Name Here Directions: Please note that for some problems you will be pasting your answers into this document and for others,...

computational neuroscience


Homework 4 Computational Neuroscience  Spring 2020  Pyzza Name: Type Your Name Here Directions: Please note that for some problems you will be pasting your answers into this document and for others, you will be writing m-files. Your submission should consist of this document and 4 m-files, all in one zipped folder labeled HW4_Lastname. Then submit the folder to Blackboard. 1. (15 points) Often in computational neuroscience, we may need to generate data as well as design the models that use that data. In this problem we will practice doing both. Recall our discussion of the thermoreceptive neuron problem from class and consider the following. Create a script called thermo_resp_curve.m that generates temperature values from 17o C to 25o C. Then, create firing rate values according to the general rule: firing rate = -126 + 8 (room temperature). While this data would be perfect, biology is likely to produce imperfect data. Alter each of these values with a Gaussian random number with standard deviation 1.5. Use the polyfit command with the degree of 1 to get the slope and intercept of the line of best fit. (This is akin to the procedure used in class with Basic Fitting tools; You may find the help for polyfit useful.) Then, plot the altered firing rate data and a line of best fit on the same figure. Paste an image of this plot below and write down the equation that relates temperature to firing rate. ________________ Paste figure and include equation here ________________ In a second file, modify the find_temp function discussed in class to use the line of best fit you acquired above. In other words, implement a function in Matlab so that when you input a thermoreceptive neuron's firing rate, the function outputs the temperature of the room. Include if statements so that if the firing rate is less than 9 Hz or greater than 74 Hz, a warning is issued saying that the firing rate is near the bounds of the mathematical model. Two .m files should be submitted for Problem 1. 2. (15 points) To explore random number generation in Matlab, write a script titled rand_num_histograms.m, which uses the rand function to generate 100 numbers between 0 and 1, then plots a histogram of these numbers using 50 bins. Plot this histogram in the top panel of one figure, then use the middle and bottom panels of the figure to plot histograms of 10,000 random numbers and of 1 million random numbers, respectively. Be careful to use your semicolons or you may be reading out quite a lot of numbers… Finally, have your program generate a second figure, which does everything described above, but using the randn function instead of the rand function. Make sure that the x-axes have the same limits on all panels for easy comparison. Give appropriate titles to each panel in both figures, and label all x- and y-axes appropriately. In each case, what happens to the histograms as progressively more random numbers are generated? ________________ Paste figures and include answer here ________________ 3. (15 points, similar to lab) We want to mimic a place cell map with many action potentials near the preferential location of the place cell, modeled by a set of points that are Gaussian-distributed around the central point. Design a function named place_cell_map in which: · Function input: · The x and y locations for the center of the place cell activity · The number of action potentials to generate · The standard deviation of the Gaussian-distributed points · Function output: none · Your function should save the plot that it generates as a jpeg. · You should use randn as part of your code. · Your code should be well-commented. · If you execute the function with x=10, y=15, number of APs = 1000, and a standard deviation = 2, the final plot should look similar to this: Save and submit the m-file of the function as place_cell_map.m. 4. (15 points, from lab) Signals in the brain tend to be very noisy. Consider, for example, typical EEG traces recorded during light sleep: It is therefore useful to model noisy signals. Do so in this problem by creating a script called noisy_eeg.m, which plots a sine function with a frequency of 10 Hz, for a duration of 2 seconds. In one figure, make four different subplots: · In the first subplot, plot the sine function with no noise. · In the second subplot, plot the sine function plus Gaussian noise with a standard deviation of 0.2. · In the third subplot, plot the sine function plus Gaussian noise with a standard deviation of 0.6 · In the fourth subplot plot, the sine function plus Gaussian noise with a standard deviation of 1.3. Give each plot an appropriate title and axis labels. In the end your plot should look something like this:
Mar 02, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here