From 56ce0eb0bdae1a61414d81ac9b27622e20c99cce Mon Sep 17 00:00:00 2001 From: Jack McGrath Date: Thu, 27 Jul 2023 12:01:01 +0100 Subject: [PATCH] Square components (issue #20) --- util/vel_decomp_vE_vUN.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/vel_decomp_vE_vUN.m b/util/vel_decomp_vE_vUN.m index f97d342..f758a0d 100644 --- a/util/vel_decomp_vE_vUN.m +++ b/util/vel_decomp_vE_vUN.m @@ -142,9 +142,9 @@ % same for the uncertainty if ~isempty(gnss_sN) - UN2U_var = (1 - sind(inc).^2 .* cosd(az).^2) ./ cosd(inc); + UN2U_var = (1 - sind(inc).^2 .* cosd(az).^2) ./ cosd(inc).^2; N2U_var = ((sind(az).^2).*(sind(inc).^2)) ./ (cosd(inc).^2); - var_up = sqrt((var_UN.^2 .* UN2U_var) + (gnss_sN .* N2U_var)); + var_up = sqrt((var_UN.^2 .* UN2U_var) + ((gnss_sN.^2) .* N2U_var)); else var_up = ones(size(m_up)); end