added agent position trail to plot

This commit is contained in:
2026-01-01 16:06:19 -08:00
parent 4735c2b77b
commit c59b96f547
7 changed files with 61 additions and 9 deletions

View File

@@ -37,10 +37,7 @@ function obj = plotPerformance(obj)
end
% Add legend
agentStrings = repmat("Agent %d", size(obj.perf, 1) - 1, 1);
for ii = 1:size(agentStrings, 1)
agentStrings(ii) = sprintf(agentStrings(ii), ii);
end
agentStrings = string(cellfun(@(x) x.label, obj.agents, 'UniformOutput', false));
agentStrings = ["Total"; agentStrings];
legend(obj.fPerf.Children(1), agentStrings, 'Location', 'northwest');