-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUSVrandomizer.m
More file actions
39 lines (24 loc) · 992 Bytes
/
USVrandomizer.m
File metadata and controls
39 lines (24 loc) · 992 Bytes
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
%% import the data
opts = spreadsheetImportOptions("NumVariables", 5);
% Specify sheet and range
opts.Sheet = "Summary";
opts.DataRange = "A2:E45";
% Specify column names and types
opts.VariableNames = ["Cohort", "Animal", "Genotype", "Sex", "markings"];
opts.VariableTypes = ["double", "string", "categorical", "string", "string"];
% Specify variable properties
opts = setvaropts(opts, ["Animal", "Sex", "markings"], "WhitespaceRule", "preserve");
opts = setvaropts(opts, ["Animal", "Genotype", "Sex", "markings"], "EmptyFieldRule", "auto");
% Import the data
USVrecordings = readtable("/Users/johnbladon/Downloads/USV recordings .xlsx", opts, "UseExcel", false);
% clear variables
clear opts
%% create the age matrix
USVrecordings(isnan(USVrecordings.cohort),:)=[];
% now blow it up for early mid and late
%% now get the unique categories
%% now pull even numbers from each
%% we need ~4*8 sessions
%% pull all the files
mydir=uigetdir();
allfiles=getAllFiles(mydir,'.wav');