Commit 53a9b523 authored by Markus Mueller-Trapet's avatar Markus Mueller-Trapet

bugfix for STC calculation

parent aff0604e
......@@ -65,19 +65,13 @@ delta = max(0,refCurve + soundInsulationIndex - soundInsulation);
counter = 0; % stopping criterion
% shift reference curve until limits are reached
while sum(delta) < refSurf && counter < 1e3
if max(delta) >= deficiencyLimit
break;
elseif sum(delta) < refSurf-1
while sum(delta) < refSurf && all(delta) < deficiencyLimit && counter < 1e3
soundInsulationIndex = soundInsulationIndex + dbStep;
else
soundInsulationIndex = soundInsulationIndex - dbStep;
end
delta = max(0,refCurve + soundInsulationIndex - soundInsulation);
counter = counter+1;
end
soundInsulationIndex = soundInsulationIndex - dbStep;
delta = max(0,refCurve + soundInsulationIndex - soundInsulation);
deficiencies = itaResult(delta,freq,'freq')*itaValue(1,'dB');
deficiencies.allowDBPlot = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment