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

edt plot

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

36.7 KiB

% Data for methods
methods = {'Baked', 'Realtime'};
scenes = {'MR', 'KT', 'LR', 'ST', 'UL'};
colors = {'k', 'r', 'g', 'b', 'y'}; % Colors for each scene
markers = {'o', '^', 's'}; % Markers for each method
% Estimated data points (you may need to adjust these for accuracy)
estimated = [
0.4045 0.3208 0.7821 1.4762 0.7595; % Baked
0.4121 0.3972 0.4462 0.7924 0.3719; % Realtime
];
recorded = [
0.21 0.41 0.17 0.22 0.20; % Baked
0.21 0.41 0.17 0.22 0.20; % Realtime
];
% Create the plot
figure;
hold on;
% Plot data
for i = 1:2 % For each method
for j = 1:5 % For each scene
plot(estimated(i,j), recorded(i,j), [colors{j}, markers{i}], ...
'MarkerSize', 10, 'LineWidth', 1.5, 'MarkerFaceColor', colors{j}, 'MarkerEdgeColor','black');
end
end
% Plot JND lines
x = linspace(0, 3.6, 100);
jnd_line = plot(x, 1.05*x, 'k--', x, 0.95*x, 'k--', 'LineWidth', 1.5);
% Set axis limits and labels
xlim([0 3.6]);
ylim([0.12 0.48]);
xlabel('Estimated (s)');
ylabel('Recorded (s)');
% Create combined legend
legend_handles = [];
legend_labels = [];
% Method shapes
for i = 1:length(methods)
h = plot(NaN,NaN,['k' markers{i}],'MarkerSize',10, 'MarkerFaceColor','none');
legend_handles = [legend_handles, h];
legend_labels = [legend_labels, methods(i)];
end
% JND line
jnd_handle = plot(NaN,NaN,'k--','LineWidth',1.5);
legend_handles = [legend_handles, jnd_handle];
legend_labels = [legend_labels, {'JND'}];
% Scene colors
for i = 1:length(scenes)
h = plot(NaN,NaN,[colors{i}, 's'], 'MarkerSize',10, 'MarkerFaceColor',colors{i}, 'MarkerEdgeColor','black');
legend_handles = [legend_handles, h];
legend_labels = [legend_labels, scenes(i)];
end
% Create the combined legend
l = legend(legend_handles, legend_labels, 'Location', 'northwest', 'NumColumns', 1);
% Adjust plot properties
grid on;
box on;
set(gca, 'FontSize', 12);
title('EDTs for the five rooms');
% Make sure the legend is visible
set(l, 'AutoUpdate', 'off')
hold off;
\ 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