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