forked from garethjns/DriftDiffusion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmultiDDExamples.m
78 lines (56 loc) · 2.02 KB
/
multiDDExamples.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
%% MultiDD
% Create a multisensory decision based on unisensory accumulators
% Uses
its = 300;
params.treshold = 10;
clear mods
close all force
% Create individual models using template
stim1.delta1 = rand(1,its)>0.88;
stim1.delta2 = 0 - (rand(1,its)>0.99);
stim2.delta1 = rand(1,its)>0.75;
stim2.delta2 = 0 - (rand(1,its)>0.80);
params.template = 'Delta2D_CustomLin';
mods.DD1 = DD(params, stim1);
mods.DD2 = DD(params, stim2);
% Or
% mods = {DD(params, stim1), DD(params, stim2)};
% Create multiseosnry model
% (and run to deicsion)
mulMod = MultiDD(mods, params);
% Print available methods
methodsview(mulMod);
% No plot methods yet. Print decision.
display(mulMod)
%% Run basic multisensory experiment
% 1 stimulus per modality
% 2 Modalities
n = 25;
rates = [6, 7, 8, 9, 10, 11, 12, 13];
modalities = 3; % 3 = AV
[y, yErr] = Experiments.basicExperiment(rates, n, modalities);
%% Run basic uni and multi-sensory experiment
% Run experiment as above but also with uni sensory modalities
n = 500;
rates = [6, 7, 8, 9, 10, 11, 12, 13];
modalities = [1, 2, 3]; % 1 = "Auditory", 2 = "visual", 3 = AV
[y, yErr] = Experiments.basicExperiment(rates, n, modalities);
%% Run unbalanced, basic uni and multi-sensory experiment
% Run experiment as above but with More noise on "visual" modality (than
% "auditory" modality)
n = 500;
rates = [6, 7, 8, 9, 10, 11, 12, 13];
modalities = [1, 2, 3]; % 1 = "Auditory", 2 = "visual", 3 = AV
[y, yErr] = Experiments.basicUnbalancedExperiment(rates, n, modalities);
%% Run BB uni and multi-sensory experiment - not working yet
% More noise on "visual" modality
n = 500;
rates = [6, 7, 8, 9, 10, 11, 12, 13];
modalities = [1, 2, 3]; % 1 = "Auditory", 2 = "visual", 3 = AV
[y, yErr] = Experiments.BBExperiment(rates, n, modalities);
%% Run unbalanced, BB uni and multi-sensory experiment - not working yet
% More noise on "visual" modality
n = 100;
rates = [6, 7, 8, 9, 10, 11, 12, 13];
modalities = [1, 2, 3]; % 1 = "Auditory", 2 = "visual", 3 = AV
[y, yErr] = Experiments.BBExperiment(rates, n, modalities);