-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathputRawTT.m
More file actions
40 lines (35 loc) · 1.04 KB
/
putRawTT.m
File metadata and controls
40 lines (35 loc) · 1.04 KB
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
%putRawTT.m
%Demo file on how to write SE and TT files
%This function can write either.
%
%modeOut: 1 is SE, 2 is TT
%
%
%urut/MPI/Dec11
function putRawTT( modeOut, filenameOut, timestamps, dataPointsOut, headerLine )
AppendFile=0;
ExtractMode=1;
ModeArray=1;
NumRecs=length(timestamps);
%all
% Field List
% 1. Timestamps
% 2. Sc Numbers
% 3. Cell Numbers
% 4. Params
% 5. Data Points
% 6. Header
FieldSelection(1) = 1; %timestamps
FieldSelection(2) = 0;
FieldSelection(3) = 0;
FieldSelection(4) = 0;
FieldSelection(5) = 1; %samples
FieldSelection(6) = 1;%header
HeaderOut{1} = ['######## Neuralynx']; %this is REQUIRED as header prefix
HeaderOut{2} = ['FileExport Mat2NlxTT_SE-urut unix-vers'];
HeaderOut{3} = [' ' headerLine];
if modeOut == 1
Mat2NlxSE( filenameOut, AppendFile, ExtractMode, ModeArray, NumRecs, FieldSelection, timestamps, dataPointsOut, HeaderOut' );
else
Mat2NlxTT( filenameOut, AppendFile, ExtractMode, ModeArray, NumRecs, FieldSelection, timestamps, dataPointsOut, HeaderOut' );
end