|
@@ -1,13 +1,15 @@
|
|
|
|
|
+%% -*- mode: octave -*-
|
|
|
%%
|
|
%%
|
|
|
%% *SpHEAR Project
|
|
%% *SpHEAR Project
|
|
|
%%
|
|
%%
|
|
|
%% sphear_a2b_all: calculate A2B matrixes for frequency ranges
|
|
%% sphear_a2b_all: calculate A2B matrixes for frequency ranges
|
|
|
%%
|
|
%%
|
|
|
%% usage:
|
|
%% usage:
|
|
|
-%% [F FE Fs A2BF PVF COND TF] = sphear_a2b_all(m, fmin, fmax, Noct, Nfft, plot_on)
|
|
|
|
|
|
|
+%% [F FE Fs A2BF PVF COND TF] = sphear_a2b_all(m, fmin, fmax, cond_mult, Noct, Nfft, plot_on)
|
|
|
%%
|
|
%%
|
|
|
%% m: vector of measurement numbers to take into account
|
|
%% m: vector of measurement numbers to take into account
|
|
|
%% fmin, fmax: lower and upper frequency limits
|
|
%% fmin, fmax: lower and upper frequency limits
|
|
|
|
|
+%% cond_mult: multiplier for transition frequency calculation (default should be 1/2)
|
|
|
%% Noct: width of frequency ranges in fractions of an octave, this
|
|
%% Noct: width of frequency ranges in fractions of an octave, this
|
|
|
%% will be changed slightly so that the frequency range is
|
|
%% will be changed slightly so that the frequency range is
|
|
|
%% covered by equally spaced frequency bands
|
|
%% covered by equally spaced frequency bands
|
|
@@ -33,7 +35,7 @@
|
|
|
%% You should have received a copy of the GNU General Public License
|
|
%% You should have received a copy of the GNU General Public License
|
|
|
%% along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
%% along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
-function [F FE Fs A2BF PVF COND TF] = sphear_a2b_all(m, fmin, fmax, Noct, Nfft, plot_on)
|
|
|
|
|
|
|
+function [F FE Fs A2BF PVF COND TF] = sphear_a2b_all(m, fmin, fmax, cond_mult, Noct, Nfft, plot_on)
|
|
|
|
|
|
|
|
%% do not plot by default
|
|
%% do not plot by default
|
|
|
if (!exist("plot_on"))
|
|
if (!exist("plot_on"))
|
|
@@ -71,10 +73,9 @@ function [F FE Fs A2BF PVF COND TF] = sphear_a2b_all(m, fmin, fmax, Noct, Nfft,
|
|
|
|
|
|
|
|
%% calculate the transition frequency of the array
|
|
%% calculate the transition frequency of the array
|
|
|
[value, index] = max(COND);
|
|
[value, index] = max(COND);
|
|
|
- TF = fc(index) / 2;
|
|
|
|
|
|
|
+ TF = fc(index) * cond_mult;
|
|
|
printf("max condition %fHz, cf %f, fe %f, transition %f\n", value, fc(index), fe(index), fc(index)/2);
|
|
printf("max condition %fHz, cf %f, fe %f, transition %f\n", value, fc(index), fe(index), fc(index)/2);
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
F = fc;
|
|
F = fc;
|
|
|
FE = fe;
|
|
FE = fe;
|
|
|
Fs = srate;
|
|
Fs = srate;
|