Skip to content
GitLab
Menu
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
e8141cc0
Commit
e8141cc0
authored
Jul 13, 2020
by
Markus Mueller-Trapet
Committed by
Dipl.-Ing. Jonas Stienen
Jul 15, 2020
Browse files
simplified function to reduce code repetition
parent
9a6b1f42
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/RoomAcoustics/BuildingAcoustics/ita_soundInsulationIndexImpact.m
View file @
e8141cc0
...
...
@@ -38,7 +38,7 @@ elseif strcmpi(sArgs.type,'astm') % Reference curve and frequencies according to
refCurve
=
[
2
2
2
2
2
2
1
0
-
1
-
2
-
3
-
6
-
9
-
12
-
15
-
18
]
.'
;
refSurf
=
32
;
% for high-frequency rating
refCurveIIC
=
refCurve
(
7
:
end
);
refCurveIIC
=
refCurve
(
7
:
end
);
refSurfHIIC
=
20
;
else
error
([
upper
(
mfilename
)
':wrong input for type'
]);
...
...
@@ -67,13 +67,17 @@ impactInsulationClass = max(ceil(NISPL-refCurve));
delta
=
max
(
0
,
NISPL
-
(
refCurve
+
impactInsulationClass
));
counter
=
0
;
% stopping criterion
% shift reference curve until limits are reached
while
sum
(
delta
)
<=
refSurf
&&
all
(
delta
<=
deficiencyLimit
)
&&
counter
<
1e3
impactInsulationClass
=
impactInsulationClass
-
dbStep
;
delta
=
max
(
0
,
NISPL
-
(
refCurve
+
impactInsulationClass
));
counter
=
counter
+
1
;
end
impactInsulationClass
=
impactInsulationClass
+
dbStep
;
delta
=
max
(
0
,
NISPL
-
(
refCurve
+
impactInsulationClass
));
deficiencies
=
itaResult
(
delta
,
freq
,
'freq'
)
*
itaValue
(
1
,
'dB'
);
deficiencies
.
allowDBPlot
=
false
;
% different procedure for ASTM
if
strcmpi
(
sArgs
.
type
,
'astm'
)
while
sum
(
delta
)
<=
refSurf
&&
all
(
delta
<=
deficiencyLimit
)
&&
counter
<
1e3
impactInsulationClass
=
impactInsulationClass
-
dbStep
;
delta
=
max
(
0
,
NISPL
-
(
refCurve
+
impactInsulationClass
));
counter
=
counter
+
1
;
end
impactInsulationClass
=
impactInsulationClass
+
dbStep
;
impactInsulationClass
=
110
-
impactInsulationClass
;
% high-frequency rating
NISPL_HIIC
=
NISPL
(
7
:
end
);
...
...
@@ -87,19 +91,8 @@ if strcmpi(sArgs.type,'astm')
end
impactInsulationClassH
=
impactInsulationClassH
+
dbStep
;
impactInsulationClassH
=
110
-
impactInsulationClassH
;
else
while
sum
(
delta
)
<=
refSurf
&&
all
(
delta
<=
deficiencyLimit
)
&&
counter
<
1e3
impactInsulationClass
=
impactInsulationClass
-
dbStep
;
delta
=
max
(
0
,
NISPL
-
(
refCurve
+
impactInsulationClass
));
counter
=
counter
+
1
;
end
impactInsulationClass
=
impactInsulationClass
+
dbStep
;
end
delta
=
max
(
0
,
NISPL
-
(
refCurve
+
impactInsulationClass
));
deficiencies
=
itaResult
(
delta
,
freq
,
'freq'
)
*
itaValue
(
1
,
'dB'
);
deficiencies
.
allowDBPlot
=
false
;
%% adaptation term for ISO
if
strcmpi
(
sArgs
.
type
,
'iso'
)
C
=
round
(
round
((
10.
*
log10
(
sum
(
data
.
freq2value
(
100
,
2500
)
.^
2
))
+
93.98
)/
0.1
)
*
0.1
-
15
-
impactInsulationClass
);
...
...
@@ -119,7 +112,6 @@ if sArgs.createPlot
refCurve
=
refCurve
+
110
-
impactInsulationClass
;
else
refCurve
=
refCurve
+
impactInsulationClass
;
end
plotResult
=
itaResult
([[
nan
(
sum
(
freqVector
<
min
(
freq
)),
1
);
10.
^
((
refCurve
)
.
/
20
);
nan
(
sum
(
freqVector
>
max
(
freq
)),
1
)],
[
ones
(
sum
(
freqVector
<=
500
),
1
)
*
10.
^
(
refCurve
(
freq
==
500
)
.
/
20
);
nan
(
sum
(
freqVector
>
500
),
1
)]],
freqVector
,
'freq'
);
fgh
=
ita_plot_freq
(
data
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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