Skip to content
Snippets Groups Projects
Commit fd374c10 authored by mhby1g21's avatar mhby1g21
Browse files

octave band plot rt60

parent ae31d210
No related branches found
No related tags found
1 merge request!17Objective evaluation on realtime steam audio done
rir analysis objective evaluation/octave_bandrt60.jpg

95.9 KiB

% Data
rooms = {'MR', 'KT', 'LR', 'ST', 'UL'};
frequencies = [500, 1000, 2000, 4000, 8000];
% Ground truth (approximated from the image)
ground_truth = [
0.55, 0.60, 0.65, 0.65, 0.60; % MR
0.45, 0.50, 0.55, 0.60, 0.65; % KT
0.15, 0.15, 0.15, 0.15, 0.15; % LR
1.80, 1.85, 1.90, 1.95, 1.90; % ST
0.45, 0.45, 0.50, 0.55, 0.50 % UL
];
% Baked data (corrected)
baked = [
0.19, 0.21, 0.20, 0.21, 0.21; % MR
0.18, 0.22, 0.22, 0.22, 0.23; % KT
0.50, 0.50, 0.49, 0.48, 0.45; % LR
0.72, 0.62, 0.64, 0.60, 0.62; % ST
0.44, 0.43, 0.43, 0.38, 0.47 % UL
];
% Realtime data
realtime = [
0.33, 0.42, 0.40, 0.42, 0.40; % MR
0.33, 0.44, 0.40, 0.44, 0.39; % KT
0.29, 0.36, 0.34, 0.35, 0.33; % LR
0.64, 0.73, 0.70, 0.71, 0.70; % ST
0.32, 0.41, 0.39, 0.42, 0.41 % UL
];
% Create figure with subplots
figure('Position', [100, 100, 1200, 400]);
for i = 1:length(rooms)
subplot(1, 5, i);
hold on;
% Plot ground truth
plot(frequencies, ground_truth(i,:), 'k-', 'LineWidth', 2);
% Plot JND lines (20%)
plot(frequencies, ground_truth(i,:)*1.2, 'k--', 'LineWidth', 1);
plot(frequencies, ground_truth(i,:)*0.8, 'k--', 'LineWidth', 1);
% Plot data
plot(frequencies, baked(i,:), 'gs-', 'LineWidth', 1.5, 'MarkerSize', 6); % Changed from 'y' to 'g' for green
plot(frequencies, realtime(i,:), 'rd-', 'LineWidth', 1.5, 'MarkerSize', 6);
% Customize plot
title(rooms{i});
xlabel('Frequency (kHz)');
if i == 1
ylabel('RT60 (s)');
end
xlim([400 9000]);
set(gca, 'XScale', 'log');
set(gca, 'XTick', frequencies);
set(gca, 'XTickLabel', {'0.5', '1', '2', '4', '8'});
grid on;
% Adjust y-axis limits based on data
if i == 1 % MR
ylim([0 1.4]);
elseif i == 2 % KT
ylim([0 2.1]);
elseif i == 3 % ST
ylim([0 2.5]);
else % UL
ylim([0 1.5]);
end
% Add legend only to the first subplot
if i == 1
legend('Ground Truth', 'JND', '', 'Baked', 'Realtime', 'Location', 'best');
end
hold off;
end
% Add overall title
sgtitle('RT60s over different frequency bands for the rooms');
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment