I have a loop which is generating some data and in certain cases I want to save the data. Therefore I have:
save(int2str(i), x);
This doesn
The x has to be 'x':
save(int2str(i), 'x');