-
Notifications
You must be signed in to change notification settings - Fork 0
/
appendTheData.m
49 lines (39 loc) · 1.67 KB
/
appendTheData.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
function appendTheData
close all
project = 'Dissociating-Role-of-Feedback-in-Voice-Motor-Control';
participant = 'DRF_ENP1'; % List of multiple participants.
run = 'SFL1';
trials = 5;
baselineFile = 'BV1'; % Baseline Voice information
debug = 0;
dirs = dfDirs(project);
dirs.baselineData = fullfile(dirs.SavData, participant, baselineFile, [participant baselineFile 'DRF.mat']); % Where to find data
% Look for the baseline voice info for this participant, then load it
if exist(dirs.baselineData, 'file') == 0
fprintf('ERROR: Could not find baseline data set at %s\n', dirs.baselineData)
return
else
fprintf('Loading baseline data set for %s %s\n', participant, baselineFile)
load(dirs.baselineData) % Returns DRF
bV = DRF;
end
for j = 1:trials
dirs.SavFileDir = fullfile(dirs.SavData, participant, run, [participant run 'Trial' num2str(j) 'DRF.mat']); % Where to find data
% Look for the recording sessoin raw data for this participant, then load it
fprintf('%%%%%%%%%%%%%%%%%%%%%%%%\n')
if exist(dirs.SavFileDir, 'file') == 0
fprintf('ERROR: Could not find saved data set at %s\n', dirs.SavFileDir)
return
else
fprintf('Loading saved data set for %s %s\n', participant, run)
load(dirs.SavFileDir) % Returns DRF
end
DRF.expParam.rmsB = bV.expParam.rmsB;
DRF.expParam.age = bV.expParam.age;
DRF.expParam.gender = bV.expParam.gender;
DRF.expParam.f0b = bV.qRes.meanf0;
DRF.expParam.targRMS = bV.qRes.meanRMS;
DRF.expParam.AudFB = DRF.expParam.AudFB{1};
save(dirs.SavFileDir, 'DRF')
end
end