Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marc van Wanrooij
panda
Commits
74cf1f61
Commit
74cf1f61
authored
Oct 05, 2016
by
Marc van Wanrooij
Browse files
no message
parent
60313847
Changes
6
Hide whitespace changes
Inline
Side-by-side
Audition/HRTF/pa_audiogravicHRTFs.m
View file @
74cf1f61
...
...
@@ -35,7 +35,7 @@ for ii = 1:2
cd
(
'/Users/marcw/matlab/PandA/Audition/HRTF/Knowles'
);
wavfile
=
'snd399.wav'
;
wav
=
wav
read
(
wavfile
);
wav
=
audio
read
(
wavfile
);
...
...
Coordinate/pa_sky2azel.m
View file @
74cf1f61
function
[
AZ
,
EL
]
=
pa_sky2azel
(
X
,
Y
)
function
[
AZ
,
EL
,
R
,
Phi
]
=
pa_sky2azel
(
X
,
Y
)
% SKY2AZEL Transfrom SKY to double polar coordinates.
% [AZ,EL] = SKY2AZEL(R,Phi) transforms corresponding elements of data
% stored in SKY coordinates R (Ring Number), Phi (Spoke Number)
...
...
DoingBayesianDataAnalysis/plotPost.m
View file @
74cf1f61
...
...
@@ -45,20 +45,20 @@ postSummary.hdiHigh = HDI(2);
%% Plot histogram.
hold
on
if
isempty
(
breaks
)
by
=
(
HDI
(
2
)
-
HDI
(
1
))/
18
;
breaks
=
unique
([
min
(
paramSampleVec
):
by
:
max
(
paramSampleVec
)
max
(
paramSampleVec
)]);
by
=
(
HDI
(
2
)
-
HDI
(
1
))/
18
;
nbreaks
=
floor
((
max
(
paramSampleVec
)
-
min
(
paramSampleVec
))/
by
);
breaks
=
linspace
(
min
(
paramSampleVec
),
max
(
paramSampleVec
),
nbreaks
);
end
N
=
histc
(
paramSampleVec
,
breaks
);
N
=
hist
(
paramSampleVec
,
breaks
);
db
=
mean
(
diff
(
breaks
));
histInfo
.
N
=
N
;
histInfo
.
density
=
N
.
/
db
/
sum
(
N
);
histInfo
.
breaks
=
breaks
;
if
~
showCurve
% h = bar(breaks,histInfo.density,'style','histc'); % used to work
h
=
bar
(
breaks
,
histInfo
.
density
);
delete
(
findobj
(
'marker'
,
'*'
));
% Matlab bug?
h
=
bar
(
breaks
,
histInfo
.
density
,
1
);
set
(
h
,
'FaceColor'
,
col
,
'EdgeColor'
,
'w'
);
shading
flat
end
if
showCurve
[
densCurve
.
y
,
densCurve
.
x
]
=
ksdensity
(
paramSampleVec
);
...
...
@@ -72,18 +72,18 @@ xlim(xl);
title
(
main
);
set
(
gca
,
'YTick'
,
yaxt
);
cenTendHt
=
0.9
*
nanmax
(
histInfo
.
density
);
cenTendHt
=
1.05
*
nanmax
(
histInfo
.
density
);
cvHt
=
0.7
*
nanmax
(
histInfo
.
density
);
ROPEtextHt
=
0.55
*
nanmax
(
histInfo
.
density
);
% Display mean or mode:
if
~
showMode
str
=
[
'mean = '
num2str
(
postSummary
.
mean
,
3
)];
str
=
[
'mean = '
num2str
(
postSummary
.
mean
,
2
)];
text
(
postSummary
.
mean
,
cenTendHt
,
str
,
'HorizontalAlignment'
,
'center'
);
else
[
~
,
indx
]
=
max
(
mcmcDensity
.
y
);
modeParam
=
mcmcDensity
.
x
(
indx
);
str
=
[
'mode = '
num2str
(
postSummary
.
mode
,
3
)];
str
=
[
'mode = '
num2str
(
postSummary
.
mode
,
2
)];
text
(
modeParam
,
cenTendHt
,
str
,
'HorizontalAlignment'
,
'center'
);
end
...
...
@@ -100,7 +100,7 @@ if ~isempty(compVal)
end
%% Display the ROPE.
if
~
isempty
(
ROPE
)
ropeCol
=
[
.
5
0
0
];
ropeCol
=
[
0
0
0
.5
];
pcInROPE
=
sum
(
paramSampleVec
>
ROPE
(
1
)
&
paramSampleVec
<
ROPE
(
2
))/
length
(
paramSampleVec
);
plot
(
ROPE
([
1
1
]),[
0
0.96
*
ROPEtextHt
],
':'
,
'LineWidth'
,
2
,
'Color'
,
ropeCol
);
plot
(
ROPE
([
2
2
]),[
0
0.96
*
ROPEtextHt
],
':'
,
'LineWidth'
,
2
,
'Color'
,
ropeCol
);
...
...
@@ -124,11 +124,11 @@ axis square;
%% Display the HDI.
plot
(
HDI
,[
0
0
],
'k-'
,
'LineWidth'
,
4
);
str
=
[
num2str
(
100
*
credMass
,
2
)
'% HDI'
];
text
(
mean
(
HDI
),
ydiff
/
20
+
ydiff
/
2
0
,
str
,
'HorizontalAlignment'
,
'center'
);
text
(
mean
(
HDI
),
ydiff
/
4
0
,
str
,
'HorizontalAlignment'
,
'center'
);
str
=
num2str
(
HDI
(
1
),
3
);
text
(
HDI
(
1
),
ydiff
/
2
0
,
str
,
'HorizontalAlignment'
,
'center'
);
text
(
HDI
(
1
),
-
ydiff
/
4
0
,
str
,
'HorizontalAlignment'
,
'center'
);
str
=
num2str
(
HDI
(
2
),
3
);
text
(
HDI
(
2
),
ydiff
/
2
0
,
str
,
'HorizontalAlignment'
,
'center'
);
text
(
HDI
(
2
),
-
ydiff
/
4
0
,
str
,
'HorizontalAlignment'
,
'center'
);
NIRS/nirs_av_figure5_onesubject.m
View file @
74cf1f61
...
...
@@ -17,7 +17,7 @@ end
Txt
=
Txt
(
2
:
end
,:);
figure
(
2
)
clf
subj
=
1
;
subj
=
1
7
;
sel
=
nmbr
==
subj
;
fnames
=
{
d
(
sel
)
.
name
};
nfiles
=
numel
(
fnames
);
...
...
NIRS/nirs_av_figure7_glm.m
View file @
74cf1f61
...
...
@@ -68,8 +68,8 @@ sel = A(end-4:end)<V(end-4:end);
% [sum(sel) length(A(end-4:end))]
keyboard
return
%
keyboard
%
return
[
H
,
P
,
CI
]
=
ttest
(
A
,
V
);
[
P
,
H
]
=
ranksum
(
A
,
V
);
...
...
@@ -453,4 +453,4 @@ xlswrite('Wilcoxon.xlsx',M,'Modality')
% xlswrite('Wilcoxon.xlsx',D,'Cohort')
%%
keyboard
%
keyboard
Tmp/tmp.m
View file @
74cf1f61
cd('/Users/marcw/DATA/SS-0001-15-10-16');
fname = 'SS-0001-15-10-16-0001.mat';
load(fname);
SupSac = pa_supersac(Sac,Stim,2,1);
unique(SupSac(:,29))
sel = ismember(SupSac(:,30),300:399)
&
ismember(SupSac(:,29),[55 65]);
x = SupSac(sel,24);
y = SupSac(sel,9);
plotloc(x,y,'diag',true);
1e-3*8.3e-11/15.5e-11
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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