Loop example in MATLAB

Loop example in MATLAB

Output:

A =

1 2 3
4 5 6
7 8 9
C =

1 2 3 4 5 6 7 8 9