Make the size of the fixation dot a variable

Assignment Help MATLAB Programming
Reference no: EM132094099

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.

Reference no: EM132094099

Questions Cloud

Write a two-paragraph submission about the lecture : Film critic Robert Horton's was on campus for a lecture a couple of years ago, and that lecture is available on YouTube.
What it takes to enter new markets : You are in a meeting to try to understand what it takes to enter new markets. What lessons can be learned from Walmart's experience in Mexico
Discuss how the definition of privacy that is commonly used : Discuss how the definition of privacy that is commonly used (freedom from observation) may differ from the definition of privacy.
Identify the problems on various carnival cruise lines : 1. Identify the problems on various Carnival Cruise Lines as included in the article. 2. What is the root cause of the problems?
Make the size of the fixation dot a variable : Matlab and Psychtoolbox programming for Cognitive Neuroscience Summative Assignment - Make the size of the fixation dot a variable
Which architecture for deploying a firewall is most used : What are the reasons that VPN technology has become the dominant method for remote workers to connect to the organizational network?
Statute of frauds applies : If the Statute of Frauds applies, does the specially-manufactured goods exception apply, so that the contract would not have to be in writing to be enforceable
What types of translations are possible : What are the three categories of relationships in ER diagrams? What distinguishes relationships in "roles" from all other relationships in an ER diagram?
Training and development industry : Now that you have completed this course, what do you see changing, going away, developing, etc. for the training and development industry

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd