MATLAB: How to separate matrix row

matrixix

let's say
A = [ 1 2; 1 2; 1 2]
A =
1 2
1 2
1 2
Any command that can I separate it into turn into
B =
1 2
1 2
1 2
C =
0 2
0 2
0 2
Thanks!!
————– I try to do it like this, but doesn't work
B = A(:,1)
B =
1
1
1

Best Answer

use
A =[1 2
1 2
1 2]
A(:,1)=0;
B=A