Taking part of a matrix.
|
06-30-2021, 01:25 PM
Post: #1
|
|||
|
|||
Taking part of a matrix.
Is there any way of take part of a matrix? For example in Matlab it could be A(i:j,m:n) to take from i to j rows and m to n columns.
I know that in HP Prime we could take an element of a matrix, A(i,j). |
|||
06-30-2021, 02:54 PM
Post: #2
|
|||
|
|||
RE: Taking part of a matrix.
(06-30-2021 01:25 PM)Isai Wrote: Is there any way of take part of a matrix? For example in Matlab it could be A(i:j,m:n) to take from i to j rows and m to n columns. This operation is called "slicing" the matrix. I don't think there is anything built-in to do it, except in Python/Numpy. — Ian Abbott |
|||
06-30-2021, 03:22 PM
Post: #3
|
|||
|
|||
RE: Taking part of a matrix.
Hi, try using the "SUB" command:
"SUB (Matrix, {rowA, columnA}, {rowB, columnB})". Look at the attachment. |
|||
06-30-2021, 04:42 PM
Post: #4
|
|||
|
|||
RE: Taking part of a matrix.
(06-30-2021 01:25 PM)Isai Wrote: Is there any way of take part of a matrix? For example in Matlab it could be A(i:j,m:n) to take from i to j rows and m to n columns. From the section "Matrix references" in the Prime manual: Quote:M1({{1,1},{2,2}}) extracts a sub-matrix from the element in the first row and column to the element in the second row and column. So your Mathlab example for A(i:j,m:n) would translate on the Prime to M1({{i,m},{j,n}}) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)