matlab variable name in string code example Example: eval matlab variable name for i=1:3 eval(['A' num2str(i) '= i']) end