Display the instructions in the command window

Assignment Help Other Subject
Reference no: EM133135114

This script will run a free-association exercise that works as follows: A series of words is presented, and after each presented word the subject responds as quickly as possible by typing the first word that comes to mind.

Begin your script with the following:

• Opening comments.
• Clear the variables from the workspace.
• Clear the command window.
• Shuffle the random number generator.

In the PREPARE WORD-PROMPTS section:

• Import the provided csv file (free association word list.csv) into a table called wordTable. There will be two columns in the table: Word (a list of words) and IsAdjective (0 indicating the given word is not an adjective, or 1 indicating the given word is an adjective).

• Define numPrompts as 10, representing the number of word-prompts that will be used in the exercise. DO NOT HARD-CODE THE NUMBER 10 ANYWHERE ELSE IN THE PROGRAM.

• Define prompts as either a 2 x 5 string array or a 2 x 5 cell array of character vectors. Row 1 should contain 5 randomly selected non-adjectives from the table in a random order, and row 2 should contain 5 randomly selected adjectives from the table. Instead of hard-coding the number 5, use numPrompts/2 so your program will still work if other even values of numPrompts are used. IMPORTANT: Make sure the selected words are randomly selected from the list; don't just choose the fist 5 of each type; every word in the list should have a chance of being selected. If you wish, before randomly selecting the words, you may extract all the words from the table into two vectors (a vector of all the non-adjectives and a vector of all the adjectives).

In the FREE-ASSOCIATION EXERCISE section:

• Initialize a cell column-vector called responses to hold the subject's responses.

• Initialize a numeric column-vector (using NaN values) called responseSecs to hold the subject's response times (i.e., the number of seconds the subject takes to complete each response).

• Display the following instructions in the command window:

EXERCISE

After each presented word, type the first word that comes to mind in response.
Type your answer as quickly as possible without thinking about it, and then press Return. Press any key to begin.
• Use a for-loop to present the words in the prompts matrix one at a time, collecting a response to each. Alternate between non-adjectives and adjectives (i.e., the first word should be a non-adjective,
the second word should be an adjective, the third word should be a non-adjective, the fourth word should be an adjective, and so on). HINT: Use linear indexing to efficiently alternate between rows of the prompts matrix.

• Clear the command window before presenting each prompt.

• Put a line-break at the end of each prompt to ensure that the user's response is typed on the line below the prompt.

• For each prompt, if the response is empty (i.e., if the user just presses Return without entering anything), repeat the same prompt until a nonempty response is given.

• For each prompt, if the response is ‘abort exercise' (with any capitalization), print Exercise aborted. in the command window, and end the program immediately.

• Record the number of seconds it takes the subject to complete their response to each prompt. If you're using Matlab remotely, the response time might not be recorded correctly, due to lags in the registering of key-presses.

In the REPORT section:

• Define resultsTable as a table with the following 3 columns: Prompt (the prompts in the order they were presented), Response (the corresponding responses to the prompts), Seconds (the corresponding response times in seconds).

• Clear the command window, and then display resultTable in the command window using the disp function.

• Below the table, print
Exercise complete!
in the command window.

In the SAVE section:

• Save prompts, responses, and responseSecs to a file called psych20ahw5data.mat

• Export resultsTable to a file called psych20ahw5results.csv

Attachment:- Matlab script.rar

Reference no: EM133135114

Questions Cloud

Create all journal entries to record the pension expense : The pension fund paid out benefits in each year. Create all journal entries to record the pension expense and the company's pension plan funding for both years
Define the term forced ranking : What are the advantages and disadvantages of using a 'forced ranking' performance management process?Formulate an opinion and support it with properly cited sou
Witnessed moral hazard in the workplace : Give examples from your employment history where you witnessed moral hazard in the workplace. What were the incentives that gave rise to moral hazard?
Describe second artifact : 1. Using your reading notes for reference, describe your first artifact ("The Man to Send Rain Clouds").
Display the instructions in the command window : Display the instructions in the command window - Initialize a numeric column-vector (using NaN values) called responseSecs to hold the subject's response times
High quality and productivity in the organization : Give a reflection on the concept of ensuring high quality and productivity in the organization.
Shattering the glass ceiling can take : Identify two strategies organizations that are committed to shattering the glass ceiling can take. Support your response with research and specific examples.
Organizational planning and human resource planning : 1. List down and briefly discuss any five (5) aims / benefits of strategic human resource management to an organization (G1)
What is your npw for option a : Initial purchase price of $8340, annual cost for equipment replacement of $2215, What is your NPW for Option A

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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