Commit 238cbe96 authored by Lukas Aspöck's avatar Lukas Aspöck

- Refactoring: "getReverbTime" is now called "getEquationBasedReverbTime"

- Bugfix for more recent MATLAB version: removed quotation marks from MatNames list in load_ac3d class
parent c98ff468
...@@ -21,16 +21,19 @@ classdef itaRavenProject < handle ...@@ -21,16 +21,19 @@ classdef itaRavenProject < handle
% %
% Example: % Example:
% rpf = itaRavenProject(); % rpf = itaRavenProject();
% rpf.SetModel('cave.ac') % rpf.SetModel('cave.ac');
% rpf.run() % rpf.getEquationBasedReverbTime(); returns reverb time based on
% rpf.getReverbTime() % sabine equation
% rpf.run(); run simulation
% rpf.getT30(); get T30 based on simulation
% %
% %
% Author: Soenke Pelzer (spe@akustik.rwth-aachen.de) % Author: Soenke Pelzer (spe@akustik.rwth-aachen.de)
% Lukas Aspck (las@akustik.rwth-aachen.de) % Lukas Aspck (las@akustik.rwth-aachen.de)
%
% Version: 0.1 % Version: 0.1
% First release: 01.11.10 % First release: 01.11.10
% Last revision: 12.09.16 % Last revision: 27.03.18
% Copyright: Institute of Technical Acoustics, RWTH Aachen University % Copyright: Institute of Technical Acoustics, RWTH Aachen University
% %
...@@ -2810,8 +2813,8 @@ classdef itaRavenProject < handle ...@@ -2810,8 +2813,8 @@ classdef itaRavenProject < handle
end end
%------------------------------------------------------------------ %------------------------------------------------------------------
function RT = getReverbTime(obj, eyring, roomID) function RT = getEquationBasedReverbTime(obj, eyring, roomID)
%RT = getReverbTime(eyring, roomID) %RT = getEquationBasedReverbTime(eyring, roomID)
% %
% returns the estimated reverberation time of the current room. % returns the estimated reverberation time of the current room.
% %
...@@ -2843,21 +2846,21 @@ classdef itaRavenProject < handle ...@@ -2843,21 +2846,21 @@ classdef itaRavenProject < handle
% get reverberation time % get reverberation time
if (eyring == 1) if (eyring == 1)
airAbsorption = determineAirAbsorptionParameter(obj.getTemperature, obj.getPressure, obj.getHumidity); airAbsorption = determineAirAbsorptionParameter(obj.getTemperature, obj.getPressure, obj.getHumidity);
RT = roommodel.getReverbTime(obj.pathMaterials, 'eyring', airAbsorption); RT = roommodel.getEquationBasedReverbTime(obj.pathMaterials, 'eyring', airAbsorption);
else else
airAbsorption = determineAirAbsorptionParameter(obj.getTemperature, obj.getPressure, obj.getHumidity); airAbsorption = determineAirAbsorptionParameter(obj.getTemperature, obj.getPressure, obj.getHumidity);
RT = roommodel.getReverbTime(obj.pathMaterials, 'sabine', airAbsorption); RT = roommodel.getEquationBasedReverbTime(obj.pathMaterials, 'sabine', airAbsorption);
end end
end end
%------------------------------------------------------------------ %------------------------------------------------------------------
function RT = getReverbTime_Sabine(obj) function RT = getReverbTime_Sabine(obj)
RT = obj.getReverbTime(0); RT = obj.getEquationBasedReverbTime(0);
end end
%------------------------------------------------------------------ %------------------------------------------------------------------
function RT = getReverbTime_Eyring(obj) function RT = getReverbTime_Eyring(obj)
RT = obj.getReverbTime(1); RT = obj.getEquationBasedReverbTime(1);
end end
%------------------------------------------------------------------ %------------------------------------------------------------------
......
...@@ -69,6 +69,7 @@ classdef load_ac3d ...@@ -69,6 +69,7 @@ classdef load_ac3d
mat_rows = find(strcmp(ac3d,'MATERIAL')==1); % Zeilenindizes der Materialien mat_rows = find(strcmp(ac3d,'MATERIAL')==1); % Zeilenindizes der Materialien
MatNames = ac3d(mat_rows,2); % Cell der Material Namen MatNames = ac3d(mat_rows,2); % Cell der Material Namen
MatNames = strrep(MatNames,'"',''); % make sure that no quotation marks are in the material
MatColors = str2double(ac3d(mat_rows,4:6)); % Matrix der RGB Material Farben MatColors = str2double(ac3d(mat_rows,4:6)); % Matrix der RGB Material Farben
......
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