Skip to content

Commit d93f22a

Browse files
authored
Merge pull request #15 from Ergo-Tools/next-version
Version 1.55
2 parents 44ab82b + 8d91f1a commit d93f22a

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

utils/readActGT3xcsv.m

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
% Data [Nx4] datetime (Matlab datenum format) and triaxial Acc data
99
% SF [double] sample frequency
1010
% deviceID [string] the device ID
11-
12-
11+
%
12+
%
1313
% Copyright (c) 2021, Pasan Hettiarachchi .
1414
% All rights reserved.
1515
%
@@ -41,11 +41,9 @@
4141
Data=[];
4242
SF=NaN;
4343
deviceID=NaN;
44+
4445
try
45-
46-
4746
%Import of data from csv-file:
48-
4947
Rec = importdata(Fil,',');
5048
headLs=string(Rec.textdata(:,1));
5149
%parse the text data in header

utils/readActivPALcsv.m

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
% SF [double] sample frequency
1111
% deviceID [string] the device ID
1212
% ID [string] the participant ID
13-
14-
15-
13+
%
1614
% Copyright (c) 2021, Pasan Hettiarachchi .
1715
% All rights reserved.
1816
%
@@ -43,8 +41,6 @@
4341
[~,FileName] = fileparts(Fil);
4442

4543
try
46-
47-
4844
patSN_ID = (textBoundary|"-")+alphanumericsPattern+"-AP" + digitsPattern(6) + whitespaceBoundary;
4945
textSN_ID=extract(FileName,patSN_ID);
5046
if ~isempty(textSN_ID)
@@ -55,16 +51,13 @@
5551

5652
ID=FileName;
5753
deviceID=NaN;
58-
5954
end
6055

6156
%Import af data fra csv-datafilen:
6257

6358
Rec = importdata(Fil,';',2);
64-
6559
time = Rec.data(:,1);
6660

67-
6861
it = Rec.data(:,2); %sampleindex
6962
Acc = Rec.data(:,size(Rec.data,2)-2:size(Rec.data,2)); %last 3 columns
7063
clear Rec
@@ -81,8 +74,7 @@
8174

8275
Data=zeros(length(t),4);
8376
Data(:,1)=x2mdate(t);
84-
85-
77+
8678
if max(max(Acc))> 255 % if any number exceed 255 the file must be a AP4 file
8779
Grange = 2*4; %range +/-4G
8880
Data(:,2:4) = (Acc-(1023+4)/2) * (Grange/(1023-4));

0 commit comments

Comments
 (0)