- #1
omri3012
- 62
- 0
Hallo,
I have a 3*3 matrices in matlab:
A=[ 1 2 3; 4 5 6; 7 8 9];
and i won't to accept a vector from each colume in an easy way, i.e.
a1=1 2 3 , a2=4 5 6 , a3=7 8 9
so i tried to wrote:
for i=1:3
a_i=A(:,i);
end
but i only the last vector, a3=7 8 9...
if anyone have a good suggestion it would be very helpful.
thnks
Omri
I have a 3*3 matrices in matlab:
A=[ 1 2 3; 4 5 6; 7 8 9];
and i won't to accept a vector from each colume in an easy way, i.e.
a1=1 2 3 , a2=4 5 6 , a3=7 8 9
so i tried to wrote:
for i=1:3
a_i=A(:,i);
end
but i only the last vector, a3=7 8 9...
if anyone have a good suggestion it would be very helpful.
thnks
Omri