I have a number of matrix (e.g. n=10) dw1,dw2….dw10. they are obtained through equation dw=-dudx-dvdy. I want to use a for loop to write all these matrix to an excel. I did these
for i = 1:n; dwname = sprintf('dw%d=-dudx%d-dvdy%d;',[i,i,i]); eval(dwname); xlswrite('name.xls',dwname,i,'a1:a600');end
From this loop i got all the dwi. but because dwname is a char, so the data wrote to excel is not the matrix dwi not only a string . I tried to transfer the char name to variable, but didnt make it.
Is there anyone who can help me with this?
Best Answer