Reading the matrix elements row wise
Mostra commenti meno recenti
Let say I have a matrix A = [1 2 3; 4 5 6], I can access its elements by writing A(1) and A(2) etc. but this index runs column wise. How to access elements of matrix row by row, for example if I write A(2), I want to get 2 and not 4.
Risposta accettata
Più risposte (1)
Paul Hoffrichter
il 30 Dic 2020
Modificato: Paul Hoffrichter
il 30 Dic 2020
A = [1 2 3; 4 5 6];
Atr = transpose(A);
Atr(1:6)
ans =
1 2 3 4 5 6
Categorie
Scopri di più su Linear Algebra in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!