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?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
phoenix
am 14 Mai 2018
Bearbeitet: James Tursa
am 14 Mai 2018
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?
0 Kommentare
Akzeptierte Antwort
Stephen23
am 14 Mai 2018
Bearbeitet: Stephen23
am 14 Mai 2018
A(:,1).'
2 Kommentare
James Tursa
am 14 Mai 2018
Bearbeitet: James Tursa
am 14 Mai 2018
If A is real, there is no difference in the result. If A is complex, then ' will conjugate the elements (i.e., negate the imaginary part), whereas .' will not conjugate the elements.
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!