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
406c726f
Commit
406c726f
authored
Mar 08, 2019
by
Markus Mueller-Trapet
Browse files
bugfix when frequency range of data does not match that of the ISO/ASTM standard
parent
c581d444
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/RoomAcoustics/BuildingAcoustics/ita_soundInsulationIndexAirborne.m
View file @
406c726f
...
...
@@ -91,7 +91,8 @@ end
%% output
if
sArgs
.
createPlot
fgh
=
ita_plot_freq
(
data
);
plotResult
=
itaResult
([[
nan
(
sum
(
freqVector
<
min
(
freq
)),
1
);
10.
^
((
refCurve
+
soundReductionIndex
)
.
/
20
);
nan
(
sum
(
freqVector
>
max
(
freq
)),
1
)],
[
ones
(
sum
(
freqVector
<=
500
),
1
)
*
10.
^
(
soundReductionIndex
.
/
20
);
nan
(
sum
(
freqVector
>
500
),
1
)]],
freqVector
,
'freq'
);
combinedFreq
=
unique
([
freq
;
freqVector
]);
plotResult
=
itaResult
([[
nan
(
sum
(
combinedFreq
<
min
(
freq
)),
1
);
10.
^
((
refCurve
+
soundReductionIndex
)
.
/
20
);
nan
(
sum
(
combinedFreq
>
max
(
freq
)),
1
)],[
ones
(
sum
(
combinedFreq
<=
500
),
1
)
*
10.
^
(
soundReductionIndex
.
/
20
);
nan
(
sum
(
combinedFreq
>
500
),
1
)]],
combinedFreq
,
'freq'
);
ita_plot_freq
(
plotResult
,
'figure_handle'
,
fgh
,
'axes_handle'
,
gca
,
'hold'
);
bar
(
gca
,
deficiencies
.
freqVector
,
deficiencies
.
freq
,
'hist'
);
[
maxDef
,
maxIdx
]
=
max
(
deficiencies
.
freq
);
...
...
@@ -101,7 +102,7 @@ if sArgs.createPlot
singleNumberString
=
[
outputStr
' = '
num2str
(
soundReductionIndex
)
'dB'
];
end
legend
({
'Sound transmission loss'
,
'Shifted reference curve'
,
singleNumberString
,[
'Deficiencies (sum: '
num2str
(
sum
(
deficiencies
.
freq
))
'dB, max: '
num2str
(
maxDef
)
'dB at '
num2str
(
deficiencies
.
freqVector
(
maxIdx
))
'Hz)'
]});
xlim
([
min
(
freq
)
max
(
f
req
)]);
xlim
([
min
(
combinedFreq
)
max
(
combinedF
req
)]);
ylim
([
0
max
(
max
(
soundReduction
),
max
(
refCurve
)
+
soundReductionIndex
)
+
15
]);
end
...
...
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