Page 1 of 1

Display matrix rows and columns

Unread postPosted: 12 Apr 2018, 10:24
by 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

Unread postPosted: 12 Apr 2018, 10:48
by 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

Unread postPosted: 12 Apr 2018, 11:00
by victorio12345
Extra44 wrote: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

Unread postPosted: 12 Apr 2018, 14:18
by 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

Unread postPosted: 12 Apr 2018, 14:46
by victorio12345
parisse wrote: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!