Consider the example below. The aim is , in every circulation, to generate a variable first, only a1 in the fist circulation for example,then save the generated variable into hardware, then the workspace should be cleared right before each circulation ends considering the huge size of the data. What I can do now is only to generate the desired variable in the workspace, and I am at a loss on how to save it to the hard disk automatically .
for i=1:10;name=['a',num2str(i)];eval([name,'=',num2str(i^2),';']);%-------
% PLEASE help add a line or more here to save ai into hard disk
%-------clear allclcend
Thanks a million
Best Answer