Commit 45cb9fcc authored by Simone Liuzzo's avatar Simone Liuzzo

sotre_* from matutil to commissioningtools

parent 331c198f
function store_steerer(fname,st,st_name)
fid=fopen(fname,'w');
for i=1:size(st,1)
fprintf(fid,'%s\t%.6f\t%.4f\t%.6f\t%.5e\n',st_name{i},st(i,1:4));
end
fclose(fid);
function store_variable(fname,name,value)
%STORE_VARIABLE Adds a variable to a .mat file
%
%STORE_VARIABLE(FILENAME,VARNAME,VALUE)
%
%FILENAME: Name of a .mat file on the MATLAB path
%VARNAME: Variable name
%VALUE: Value of the variable
try
v=load(fname);
catch %#ok<CTCH>
v=struct;
end
v.(name)=value; %#ok<STRNU>
save(fname,'-struct','v');
Markdown is supported
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