Ok, this is a simple problem, I guess, but I couldn't find an answer. I have one variable with the name of the file (say, filename='Al_10_X'), and I have ten variables with the data I want to use. I want to rename the ten variables using the filename. I've tried-
strcat (filename,'_m1y')=E_m1_y(:,:,1,1);
eval(sprintf('%i_m1x)=E_m1_x(:,:,1,1);' ,filename))
and a combination of both. Any ideas?
Best Answer