(Just approaching Matlab for personal understanding), suppose I have a Z,Y matrix in this case Z=1 Y=3
A=1:3
output: 1 2 3
Now I need to increase the matrix vertically to obtain:
1 2 3
2 4 6
3 6 9
How can I achieve that without using a loop?
The easiest way is to use vector multiplication.
If your goal is to obtain
1 2 3
2 4 6
3 6 9
given A=1:3
all you have to do is
A.'*A
This will take the vector product of the transpose (.') of A with A itself
