Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

Matlab and Psychtoolbox programming for Cognitive Neuroscience Summative Assignment

The summative assignment has two parts; modifying an experiment function with Matlab and Psychtoolbox functions, and analyzing data with custom Matlab functions. You can make the assignment by modifying/writing code and commenting extensively. You can either write one piece of code with all the steps or save a new file for each task, depending on what's most appropriate. You can write a separate text file to explain how do did the steps although this is not necessary if it's clear from the code what you did.

Part 1: Matlab and Psychtoolbox programming

The first assignment is based on the MyOrientationDiscriminationExp, which you will be modifying based on the tasks below.

1. Make the size of the fixation dot a variable and give it the size of 6x6 pixels. Make sure to change the size everywhere in the script.

2. The function MyOrientationDiscriminationExp.m accepts two arguments - the reference orientation as a double variable, and the presentation mode as the second input argument. Improve the function by testing that the 2) orientation varies between -90 and 90 and that 2) 1) the second argument is a string variable. Display an error if these constraints are not met. See 'help error' if you are unsure about how to generate an error message.

3. Now modify the function to allow the following specifications for the second argument: it should either be 'simultaneous' or 'successive', and for any other input, the function should generate an error message.

4. Modify the function to show the two gabors in succession if the input is 'successive' (as it is now) and to show the two gabors next to each other (on both sides of the fixation dot at a distance of +/-30 pixels from the fixation dot), if the input is 'simultaneous'. Tip: you will need to define the 'rect' for the two stimulus locations to do this.

Part 2: Data analysis using Matlab

The assignment is based on data from one subject doing an experiment similar to MyOrientationDiscriminationExp. The data is stored in the file assingmentData.mat. Write a script that does the steps below and comment it to show your thinking. You will hand this script in with the plots and analysis results. You can also write a separate text file to explain what you did but it's not necessary if the script is self-explanatory.

5. Load in the data and plot the response times as a function of trial number. Use a dashed line for plotting and a 'diamond' for the point. Add horizontal and vertical labels, as well as a title to the plot. If you are unsure about how to do some of this make sure to use the help function for 'plot'.

6. Calculate the mean and standard deviation of the reaction times, but make sure to first remove any NaN values. Also test if the average reaction time is significantly different than 0.900 s (ttest).

7. Perform a linear regression (regress) with the log-reaction times as the dependent variable and the interstimulus interval and trial number as the independent variables. That is for trial i, the log-response time is modeled as log (RTi ) ∼ βlinear xi,trialISI xi,ISI + βdiff xi,diff + β0

Interpret the results, including the confidence intervals around the beta variables.

8. We now want to perform linear regression using fminsearch function instead. Write a function that sums the squared difference between the log-RT and the linear function:

errFnc=∑i(log(RTi ) - (βlinear xi,linear + βISI xi,ISI + βdiff xi,diff + β0))2

and minimize this function. Note that the function has 4 parameters, βlinear, βISI, βdiff, β0. The fminsearch function therefore has to find the four parameter values (or vector of length four) that minimize this function. Comment on the found beta values and whether they differ from the values found in the problem above.

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M93081570
  • Price:- $32

Priced at Now at $32, Verified Solution

Have any Question?


Related Questions in MATLAB

Suppose that you have used some concept learning algorithm

Suppose that you have used some concept learning algorithm to learn a hypothesis h1 from some training data. You are interested in knowing the accuracy that the hypothesis can be expected to achieve on the underlying pop ...

Question - verify the attached paper with matlab and get

Question - Verify the attached paper with matlab and get all the results in the paper and explain step by step the matlab code. Paper - Improving Massive MIMO Belief Propagation Detector with Deep Neural Network. Attachm ...

Prepare a 3 - 10 pages long reportprepare a presentation

Prepare a 3 - 10 pages long report Prepare a presentation with 5 - 9 slides. The slides will include introduction (need and similar work), theoretical background (tested neural networks), Data, Results (Comparison of the ...

Discrete optimisation- solve the following two problems

Discrete Optimisation - Solve the following two problems with both exhaustive enumeration and branch and bound - Problem 1 is a mixed integer linear optimisation problem (the problem has both discrete and continuous vari ...

Assignment -matlab codes and simulated model in

Assignment - Matlab codes and simulated model in simulink/matlab and truetime. 1. Matlab codes and simulink model for pid controller optimization using particle swarm optimization (PSO) my plant is integer order 1000/(s^ ...

Question a safe prime is a prime number that can be written

Question : A safe prime is a prime number that can be written in the form 2p + 1 where p is also a prime number. Write a MATLAB script file that finds and displays all safe primes between 1 and 1000.

Question 1 manipulate spectral imagehyperspectral images

Question 1. Manipulate spectral image Hyperspectral images can be seen as a generalisation of normal colour images such as RGB images. In a normal RGB colour image, there are 3 channels, i.e. channels for red colour, gre ...

Recitation problems -1 determine the highest real root of

Recitation Problems - 1. Determine the highest real root of f(x) = 2x 3 - 11.7x 2 + 17.7x - 5 using the Newton-Raphson method with at least four iterations. Start with an initial guess of x 0 = 3. 2. Determine the real r ...

Assignment matlab programmingusing appropriate matlab

Assignment: MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As