Commit 0d5fd9dd authored by mmroma's avatar mmroma
Browse files

Minor convenience changes

parent e09d44b1
......@@ -10,6 +10,9 @@ function [] = saveData(simData,params, tag)
count = count + 1;
filename = [tag num2str(count) '.mat'];
end
%% Set "curr_run"
params.curr_run = count;
%% Save Data to this file
save(fullfile(savdir, filename),'simData','params');
......
......@@ -58,34 +58,30 @@ elseif strcmp(answer, 'Y') == 1
file = input('Enter file name: ', 's');
load(file);
params.curr_run = int8(str2double(extractBetween(file, (strfind(file, 'n')+1), (strfind(file, '.')-1))));
%% Plot data
plotData(simData,params);
%% Save current figures
save_current_figure("WPs_run", 1, params.curr_run, 1);
%% Transition to animation
pause(10);
%close all;
close(figure(1));
close(figure(2));
close(figure(3));
close(figure(4));
close(figure(5));
%% Animate
if strcmp(answer, 'Y') == 1
%save_video(['Run_' int2str(params.curr_run)], simData,params);
animate(['Run_' int2str(params.curr_run)], simData,params);
else
animate('none', simData,params);
end
%% Display Error Message
else
msg = 'Error. Invalid input.';
error(msg);
end
end
%% Plot data
plotData(simData,params);
%% Save current figures
save_current_figure("WPs_run", 1, params.curr_run, 1);
%% Transition to animation
% pause(10);
% %close all;
% close(figure(1));
% close(figure(2));
% close(figure(3));
% close(figure(4));
% close(figure(5));
%% Animate
animate(['Run_' int2str(params.curr_run)], simData,params);
Supports Markdown
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