Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
97524606
Commit
97524606
authored
Dec 11, 2017
by
Markus Mueller-Trapet
Browse files
added option for band processing mode (filter or fft)
parent
c6c45ff8
Changes
1
Hide whitespace changes
Inline
Side-by-side
kernel/DSP/ita_sound_power.m
View file @
97524606
...
...
@@ -36,7 +36,7 @@ function varargout = ita_sound_power(varargin)
% Modified: 28-Nov-2017
%% Initialization and Input Parsing
sArgs
=
struct
(
'pos1_spl'
,
'itaSuper'
,
'pos2_T_empty'
,
'itaSuper'
,
'room_volume'
,
124
,
'room_surface'
,
181
,
'T'
,
20
,
'RH'
,
0.5
,
'p_s'
,
101325
,
'freqRange'
,
ita_preferences
(
'freqRange'
),
'bandsPerOctave'
,
ita_preferences
(
'bandsPerOctave'
)
);
sArgs
=
struct
(
'pos1_spl'
,
'itaSuper'
,
'pos2_T_empty'
,
'itaSuper'
,
'room_volume'
,
124
,
'room_surface'
,
181
,
'T'
,
20
,
'RH'
,
0.5
,
'p_s'
,
101325
,
'freqRange'
,
ita_preferences
(
'freqRange'
),
'bandsPerOctave'
,
ita_preferences
(
'bandsPerOctave'
)
,
'bandMode'
,
'fft'
);
[
spl
,
T_empty
,
sArgs
]
=
ita_parse_arguments
(
sArgs
,
varargin
);
% acoustic constants
...
...
@@ -48,7 +48,7 @@ C2 = 101325./double(sArgs.p_s).*sqrt((273.15 + sArgs.T)/296).^3;
%% calculate sound pressure level data
% first third-octaves then average
spl
=
ita_spk2frequencybands
(
spl
,
'freqRange'
,
sArgs
.
freqRange
,
'bandsPerOctave'
,
sArgs
.
bandsPerOctave
);
spl
=
ita_spk2frequencybands
(
spl
,
'freqRange'
,
sArgs
.
freqRange
,
'bandsPerOctave'
,
sArgs
.
bandsPerOctave
,
'mode'
,
sArgs
.
bandMode
);
spl_m
=
sqrt
(
mean
(
spl
^
2
));
spl_m
=
itaResult
(
spl_m
,
T_empty
.
freqVector
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment