%% Save results filename = 'BasicStucture.mat'; save(filename) x = load('BasicStucture.mat'); names = fieldnames(x); for iname = 1:length(names) x.(['Basic_', names{iname}]) = x.(names{iname}); x = rmfield(x, names{iname}); end %save('newmymat.mat', '-struct', 's'); save('Basic_ctrlStructure.mat', '-struct', 'x');