MATLAB: I have n*n matrix.I want to get all the elements of 1st column of nth rows like A(:,1). Now how will i arrange all the n elements into a single row i,e b=[A(1,1) A(2,1) A(3,1)………… A(n,1)].What will be the command for n being large say 5000

matrix manipulation

I have n*n matrix.I want to get all the elements of 1st column of nth rows like A(:,1). Now how will i arrange all the n elements into a single row i,e b=[A(1,1) A(2,1) A(3,1)………… A(n,1)].What will be the command for n being large say 5000?

Best Answer

The most general, correct answer is to use transpose .' (rather than conjugate transpose '):
A(:,1).'