|
|
@@ -102,19 +102,15 @@ end
|
|
|
function [A2B PV COND ERROR] = sphear_calculate_a2b(R)
|
|
|
[A2B PV ERROR] = A2B_matrix(R);
|
|
|
%% normalize matrix
|
|
|
- A2B = A2B ./ mean(mean(abs(A2B)));
|
|
|
- %% return condition number
|
|
|
- COND = cond(A2B);
|
|
|
-end
|
|
|
-
|
|
|
-function [A2B PV COND ERROR] = sphear_octa_calculate_a2b(R, uv_factor)
|
|
|
- [A2B PV ERROR] = A2B_octa_matrix(R);
|
|
|
- %% normalize matrix
|
|
|
- %
|
|
|
- %% ignore anything above first order as that will be difference
|
|
|
- %% microphones that will be low level in the reference frequency
|
|
|
- %% range and will skew the mean
|
|
|
+ %%
|
|
|
+ %% normalize first order components of the matrix first
|
|
|
A2B = A2B ./ mean(mean(abs(A2B(:,1:4))));
|
|
|
+ if (size(A2B, 2) > 4)
|
|
|
+ %% U/V are difference microphones, so at the reference
|
|
|
+ %% frequency range their signal is much lower than the
|
|
|
+ %% first order components, so normalize separately
|
|
|
+ A2B(:,5:6) = A2B(:,5:6) ./ mean(mean(abs(A2B(:,5:6))));
|
|
|
+ end
|
|
|
%% return condition number
|
|
|
COND = cond(A2B);
|
|
|
end
|