Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marc Posthuma
Bachelor Stage
Commits
3dd1eb2a
Commit
3dd1eb2a
authored
Apr 21, 2021
by
mposthuma
Browse files
added to git
parent
a442060b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Testing.m
0 → 100644
View file @
3dd1eb2a
clc; clear; all;
a = 5;
b = a * 2;
startup.m
0 → 100644
View file @
3dd1eb2a
addpath(genpath('C:\Users\marc_\OneDrive\Documents\Studie\STAGE\MATLAB Code'));
init_biofysica
test.m
0 → 100644
View file @
3dd1eb2a
lengte_1 = 2;
lengte_2 = 3;
samen = lengte_1 + lengte_2
stukje_text= 'hoi allemaal';
test_experiment.m
0 → 100644
View file @
3dd1eb2a
cfn
=
pb_clean
(
'cd'
,
'C:\Users\marc_\OneDrive\Documents\Studie\STAGE\MATLAB Code\Data\Recordings\test experiment'
);
l
=
dir
(
'converted_data*.mat'
);
if
isempty
(
l
)
D
=
pb_convertdata
(
'block_info_JJH-0007-21-04-15-0001.mat'
);
save
(
'converted_data_JJH-0001-21-04-15-0001.mat'
,
'D'
);
else
load
(
l
(
1
)
.
name
)
end
l
=
dir
(
'preprocessed_data*.mat'
);
if
isempty
(
l
)
Data
=
pb_vPrepData
(
'stim'
,
2
,
'store'
,
1
);
else
load
(
l
(
1
)
.
name
)
end
%%
t
=
Data
.
timestamps
.
optitrack
;
correctie
=
t
(
1
);
t
=
t
-
correctie
;
Gaze
=
Data
.
position
.
gaze
;
cfn
=
pb_newfig
(
cfn
);
hold
on
;
axis
square
;
plot
(
t
,
Gaze
(:,
1
))
plot
(
t
,
Gaze
(:,
2
))
pb_nicegraph
;
legend
(
'azimuth'
,
'elevation'
)
title
(
'Gaze against time'
)
xlabel
(
'Time'
)
ylabel
(
'Gaze'
)
%%
cfn
=
pb_newfig
(
cfn
);
hold
on
;
eye
=
Data
.
position
.
pupillabs
;
plot
(
t
,
eye
(:,
1
))
plot
(
t
,
eye
(:,
2
))
pb_nicegraph
;
legend
(
'azimuth'
,
'elevation'
)
title
(
'Eye against time'
)
xlabel
(
'Time'
)
ylabel
(
'Eye'
)
%%
stim
(:,
1
)
=
Data
.
stimuli
.
azimuth
;
stim
(:,
2
)
=
Data
.
stimuli
.
elevation
;
ts_stim
=
Data
.
timestamps
.
stimuli
;
ts_stim
=
ts_stim
(
3
:
4
:
252
)
-
correctie
;
cfn
=
pb_newfig
(
cfn
);
for
iP
=
1
:
2
subplot
(
2
,
1
,
iP
)
hold
on
;
plot
(
t
,
Gaze
(:,
iP
))
for
iS
=
1
:
length
(
stim
)
target
=
stim
(
iS
,
iP
)
plot
(
ts_stim
,
stim
(:,
iP
),
'x'
)
end
end
pb_nicegraph
%%
for
i
=
1
:
3
:
10
i
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment