Created
May 19, 2016 17:54
-
-
Save hmaarrfk/e492fac90aeb9e52999be405b8da576c to your computer and use it in GitHub Desktop.
Matlab template for measurements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear all; | |
close all; | |
do_save = true; | |
time_start = datestr(now, 'yymmdd_HHMMSS'); | |
if do_save == false; disp('-----------------------------------'); disp('----- Warning not saving data -----'); disp('-----------------------------------'); end | |
%% Start measurements | |
% Create a variable called save_directory | |
%% Save measurements | |
if do_save | |
clear *fig % such a hack, use regexp in save to remove saving the figures in the data | |
save([save_directory, filesep, 'data.mat']); | |
% Save your code that you used to run the experiment too | |
% remember to add class files in here in case they change for future versions | |
zip([save_directory, filesep, 'code_snapshot.zip'], ... | |
{'*.m', 'A_CLASS.m', 'A_SECOND_CLASS.m'}); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment