Skip to content

Instantly share code, notes, and snippets.

@alexstorer
Created August 8, 2012 15:00
Show Gist options
  • Save alexstorer/3295676 to your computer and use it in GitHub Desktop.
Save alexstorer/3295676 to your computer and use it in GitHub Desktop.
Pseudo-code for Matt's Experiment
num_statements = 5;
num_blocks = 9;
for run = 1:8
% 150 statements, 50 of each type
physical_order = Shuffle(1:50);
mental_order = Shuffle(1:50);
emotional_order = Shuffle(1:50);
physical_num = 1
mental_num = 1
emotional_num = 1
displayed_statements = cell(num_blocks,num_statements);
block_order = Shuffle(1:9);
for block = 1:num_blocks
statement_cond = statements(block_order(block))
target_cond = targets(block_order(block))
for statement_num = 1:num_statements
% display the stimulus statement
if target_cond==mental
this_statement = mental_order{mental_num}
mental_num = mental_num+1
elseif target_cond==physical
this_statement = physical_order{physical_num})
physical_num = physical_num+1
else
this_statement = emotional_order{emotional_num})
emotional_num = emotional_num+1
end
display_statement(this_statement)
displayed_statements{block,statement_num} = this_statement
end
end
save displayed_statements, block_order, ...
save_spss_file
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment