Skip to content

Commit 9bf5260

Browse files
committed
Incremental updates
Added flag to signal goodness of data format in Struct Added omitnan in median calculation in Arclength
1 parent be559d1 commit 9bf5260

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

+datareader/+is/Struct.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
Dout = datareader.is.Struct(Din);
5151
if Dout
5252
[Dout,dishomogeneous] = ValidateArgs(Din,opts);
53+
Dout = true;
5354
return;
5455
end
5556
elseif nargin == 3 && returnDinLabel
@@ -61,6 +62,7 @@
6162
return;
6263
end
6364
end
65+
6466
end %nargin
6567

6668
% Validates the input options and the input data
@@ -83,7 +85,7 @@
8385
fnames = fieldnames(Din);
8486
fnames = string(fnames);
8587
fields2check = ["data","time","condition","area"];
86-
fieldType = ["numeric","numeric","string","string"];
88+
fieldType = ["numeric","cell","string","string"];
8789

8890
Din_ = repmat(struct(),size(Din));
8991

+metrics/Arclength.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
FormttedData = cellfun(@(x)num2cell(x,2),E,'UniformOutput',false);
1111
M = cellfun(@(x) metrics.compute.arclength(x{:}, pars.method),...
1212
FormttedData);
13-
M = median(M);
13+
M = median(M,"omitnan");

0 commit comments

Comments
 (0)