mardi 1 décembre 2015

How come my accuracy does not match even though I am using the same variable to shuffle the matrix?

cor_ran1 = cor_target1(shuffle_trials, :);

cor_ran2 = cor_target2(shuffle_trials, :);

cor_ran1 and cor_ran2 are my 8-by-1 cell arrays that look like this:

'love'
'disgust'
'horrible'
'beautiful'
'awesome'
'hateful'
'abomination'
'despise'
'happy'
'wonderful'
'destroy'
'fantastic'
'loser'
'courageous'
'bad'
'cheer'

Now I have this loop that runs through a shuffled cell array with 16-by-10 dimension. I am trying to record and match subject input response to my cor_ran 1 and 2 variables. However, every time I run this loop. My inputs don't match with the shuffled answers :(

Is there a way I can get the accuracy properly for all sequences? I understand that the loop makes the shuffles different every time. But I need the cor_ran to match the subject input.

Any idea how????

for i = 1:size(shuffle_lags, 1)
    cor_ran1 = cor_target1(shuffle_trials, :);
    cor_ran2 = cor_target2(shuffle_trials, :);
    for j = 1:10
        ST1 = shuffle_lags{i, j};
        disp({ST1}); pause(time_var); clc
    end
    [input1, input2] = req_input;
    cell_array_t1{i, 1} = input1;clc;
    cell_array_t2{i, 1} = input2;clc;;
    acc_t1(i) = strcmp(cor_ran1{i,1}, cell_array_t1{i,1})
    pause(0.5);
    acc_t2(i) = strcmp(cor_ran2{i,1}, cell_array_t2{i,1})
    pause(0.5);

    response_file = 'participant_response.mat';
    save(response_file, 'cell_array_t1', 'cell_array_t2');

end




Aucun commentaire:

Enregistrer un commentaire