MATLAB: How to make dynamic variable names (A1, A2, …, An) with “for” loop? Using “eval” “num2str”

anti-patterndynamic variable namesevalevilnum2strvariable's name

Hello community,
my knowledge of Matlab is limited, I admit it. So, I am sorry if I am going to make mistakes.
I have to create a series of variable using a "for" loop.
I make this:
for i=1:3
eval(['A' num2str(i) '= i'])
end
and it works well, it makes 3 variables A1, A2, A3.
But I need to use this variables to make other variables B1, B2, B3 where Bi=Ai*i. So I should have B1=A1*1=1, B2=A2*2=2*2=4, B3=A3*3=3*3=9
I tried something like this:
for i=1:3
eval(['A' num2str(i) '= i'])
eval(['B' num2str(i) '= 'A' num2str(i) '*i])
end
but it gives me error and it doesn't work. Of course I simplified things, the real code is a bt more complicated but I need to know the basics of how this could work.
Thank you