From 6aae5e613b7c1275c667f2eac35fb3417d109a10 Mon Sep 17 00:00:00 2001 From: Lewin Probst <info@emirror.de> Date: Thu, 5 Dec 2019 13:03:27 +0100 Subject: [PATCH] Removed soundvelocity from A matrix. --- VERSION | 2 +- lib/+artoa/+offsets/extractOffsetsDriftsFromSolved.m | 9 ++++----- lib/+artoa/+offsets/solve.m | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index 615088b..6d58c4e 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 0bd4aea..d0800d4 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 98f6f45..4199106 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 -- GitLab