diff --git a/VERSION b/VERSION index 615088b548a173a5102a2accdb3bfc18588f1752..6d58c4e590bdd76fbff00cfc9505eedd3cc90f32 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -108 \ No newline at end of file +109 \ No newline at end of file diff --git a/lib/+artoa/+offsets/extractOffsetsDriftsFromSolved.m b/lib/+artoa/+offsets/extractOffsetsDriftsFromSolved.m index 0bd4aea47184ae137e20e8ffc638a7fdd669ea3d..d0800d43a151975b2ce35d6b656a09c51b28246c 100644 --- a/lib/+artoa/+offsets/extractOffsetsDriftsFromSolved.m +++ b/lib/+artoa/+offsets/extractOffsetsDriftsFromSolved.m @@ -2,7 +2,7 @@ function [offsets, drifts] = extractOffsetsDriftsFromSolved(pX) %EXTRACTOFFSETSDRIFTSFROMSOLVED Summary of this function goes here % Detailed explanation goes here -soundsourceCount = (length(pX) - 4) / 2; +soundsourceCount = (length(pX) - 3) / 2; offsets = NaN(soundsourceCount + 1, 1); drifts = NaN(soundsourceCount + 1, 1); @@ -10,10 +10,9 @@ drifts = NaN(soundsourceCount + 1, 1); offsets(1) = pX(end - 1); drifts(1) = pX(end); -for i = 2:soundsourceCount + 1 - startIndex = (i - 1) * 2 + 3; - offsets(i) = pX(startIndex); - drifts(i) = pX(startIndex + 1); +for i = 2:2:(soundsourceCount * 2) + offsets(i/2 + 1) = pX(i); + drifts(i/2 + 1) = pX(i + 1); end end diff --git a/lib/+artoa/+offsets/solve.m b/lib/+artoa/+offsets/solve.m index 98f6f45f5eb30558cf0d83368898e85df7891aa1..4199106c3c0eb05c2d6c987de2a681c1dfc4081a 100644 --- a/lib/+artoa/+offsets/solve.m +++ b/lib/+artoa/+offsets/solve.m @@ -89,7 +89,7 @@ for i = 1:length(fnames) end a = [ ... - soundVelocity, distances, aCore, ones(size(daysSinceFloatStart)), daysSinceFloatStart ... + distances, aCore, ones(size(daysSinceFloatStart)), daysSinceFloatStart ... ]; % remove all NaN from matrix