Skip to content
Discussion options

You must be logged in to vote

Hi @idoba2030, one way to do this is to use a global variable to store the current value of your memory array each time it changes in the memory trial, and then in your test trial, access that variable in the stimulus function, like this:

var current_memory_stim = null; // set up a global variable to hold your memory stimulus

var memory_array = function (condition) {
  number_of_images = parseInt(condition[0])
  locations = get_locations(location_names, number_of_images)
  squares_array = get_squares(change_detection_images, number_of_images)
  var squares = '';
  for (index = 0; index < number_of_images; index++) {
    squares += locations[index] + squares_array[index] + ">"
  }
  var t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@idoba2030
Comment options

Answer selected by becky-gilbert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants