Loading mem_analysis.m +9 −1 Original line number Diff line number Diff line %% lines = readlines('mem_analysis.csv'); lines = readlines('mem_analysis.csv','EmptyLineRule','skip'); names = {}; Nframes = length(lines); mem = zeros(1,Nframes); % Load mem_analysis.csv into matrix for i = 1:Nframes entries = split(lines(i),';'); for j = 1:length(entries) Loading @@ -24,6 +25,13 @@ for i = 1:Nframes end end % Reorder the matrix such that the fixed allocations are at the bottom: % --> Find all rows which are constant (sum of abs diff is zero). The >0 is % to limit the reordering to constant values only. [~,indx] = sort(sum(abs(diff(mem,[],2)),2)>0); mem = mem(indx,:); names = names(indx); bar(mem',1,'stacked') legend(names,'location','eastoutside','interpreter','none') xlabel('frame') Loading Loading
mem_analysis.m +9 −1 Original line number Diff line number Diff line %% lines = readlines('mem_analysis.csv'); lines = readlines('mem_analysis.csv','EmptyLineRule','skip'); names = {}; Nframes = length(lines); mem = zeros(1,Nframes); % Load mem_analysis.csv into matrix for i = 1:Nframes entries = split(lines(i),';'); for j = 1:length(entries) Loading @@ -24,6 +25,13 @@ for i = 1:Nframes end end % Reorder the matrix such that the fixed allocations are at the bottom: % --> Find all rows which are constant (sum of abs diff is zero). The >0 is % to limit the reordering to constant values only. [~,indx] = sort(sum(abs(diff(mem,[],2)),2)>0); mem = mem(indx,:); names = names(indx); bar(mem',1,'stacked') legend(names,'location','eastoutside','interpreter','none') xlabel('frame') Loading