Page 1 sur 1

Display matrix rows and columns

Message non luPosté: 12 Avr 2018, 10:24
de victorio12345
I'd like to know how to display matrix columns. If you dou Matrix(1), the first row is displayed. But i don't know how to do the same but for tge column.

Re: Display matrix rows and columns

Message non luPosté: 12 Avr 2018, 10:48
de Extra44
Maybe by tranposing (column <-->lines)and then doing...
transposed_matrix(1) ?
But i dont know each instruction for that...
Then if you want a column do again a tranposing instruction.

Re: Display matrix rows and columns

Message non luPosté: 12 Avr 2018, 11:00
de victorio12345
Extra44 a écrit:Maybe by tranposing (column <-->lines)and then doing...
transposed_matrix(1) ?
But i dont know each instruction for that...
Then if you want a column do again a tranposing instruction.


The thing is that if you do [1 2 3]▶Matrix(1) it introduces your vector in the first row of your matrix. So if id like to do the same but for a column i dont know if it would be practical to transpose, insert and transpose again.

Re: Display matrix rows and columns

Message non luPosté: 12 Avr 2018, 14:18
de parisse
In CAS, if m is your matrix with n rows, you can get or set column c with m[1..n,c]
For example m:=ranm(5,5); m[1..5,2] returns column 2, m[1..5,2]=seq(j,j,1,5) sets column 2.

Re: Display matrix rows and columns

Message non luPosté: 12 Avr 2018, 14:46
de victorio12345
parisse a écrit:In CAS, if m is your matrix with n rows, you can get or set column c with m[1..n,c]
For example m:=ranm(5,5); m[1..5,2] returns column 2, m[1..5,2]=seq(j,j,1,5) sets column 2.


That was what I was looking for! Thank you very much!