SAMPLE_DIR = "lqr_regulator_tests";

timestamp = datestr(now, "yyyy-mm-dd HH-MM-ss");

folder = strcat(SAMPLE_DIR, '/', timestamp, '/');

mkdir(SAMPLE_DIR, timestamp)

variables = ["e", "ed", "p", "pd", "rp", "red", "vs", "vd"];

for i = 1:numel(variables)
    file = strcat(folder, variables(i), ".mat");
    save(file, variables(i));
end

files_to_cp = ["init_heli_3_10.m", "README"];

for i = 1:numel(files_to_cp)
    dest = strcat(folder, files_to_cp(i));
    copyfile(files_to_cp(i), dest);
end

open(strcat(folder, '/README'))