|
|
@@ -26,19 +26,13 @@ function [B] = sphear_bf_power(fmin, fmax, N, Fs)
|
|
|
imin = round((N/2) * fmin / (Fs/2));
|
|
|
imax = round((N/2) * fmax / (Fs/2));
|
|
|
|
|
|
- bnames = cellstr(['w'; 'x'; 'y'; 'z']);
|
|
|
-
|
|
|
%% all measurements
|
|
|
for m = 1:16
|
|
|
- %% all b format components
|
|
|
- for b = 1:4
|
|
|
-
|
|
|
- bsignal = wavread(["../cal/2016.04.20/export/b-format-" char(bnames(b)) "-" sprintf("%02.0f", m) ".wav"]);
|
|
|
- bfft = fft(bsignal, N);
|
|
|
-
|
|
|
- %% return total power of signal in frequency range
|
|
|
- B(m, b) = sqrt(sum(bfft(imin:imax).*conj(bfft(imin:imax)))/size(bfft(imin:imax),1));
|
|
|
- end
|
|
|
+ %% all b format components, 4 channel soundfile
|
|
|
+ bsignal = wavread(["../cal/2016.04.20/export/b-format-" sprintf("%02.0f", m) ".wav"]);
|
|
|
+ bfft = fft(bsignal, N);
|
|
|
+ %% return total power of signal in frequency range
|
|
|
+ B(m, :) = sqrt(sum(bfft(imin:imax,:).*conj(bfft(imin:imax,:)))/size(bfft(imin:imax,:),1));
|
|
|
end
|
|
|
|
|
|
end
|