Post Reply 
Access Matrix by row or column
12-28-2017, 11:49 AM (This post was last modified: 12-28-2017 03:36 PM by salvomic.)
Post: #4
RE: Access Matrix by row or column
(12-28-2017 11:38 AM)Arno K Wrote:  col(M,n) and row (M,n) will do the job.

yes. The Help mentions also the possibility to use an interval, but it doesn't give examples how to input the interval (both for row and cols)...

You can also use some code like this one to get a "minor" (giving the row and col to delete: i.e. using minor(2,3) in a 3x3 matrix deletes row 2 and col 3 and returns a matrix with (1,1), (1,2), (3,1), (3,2) ...
Code:

#cas
// Minor of a matrix
// r row, c col to delete
minor(m, r,c) :=
BEGIN
  m:= delrows(m,r);
  m:= delcols(m,c);
  RETURN m;
END;
#end

Salvo

EDIT: how should input the interval in row() and col() in Home?
In CAS it's ok row(M2,2..3), a standard way to input an interval: why not implement it also in Home?

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Access Matrix by row or column - Stevetuc - 12-28-2017, 11:26 AM
RE: Access Matrix by row or column - salvomic - 12-28-2017 11:49 AM
RE: Access Matrix by row or column - JMB - 12-28-2017, 08:19 PM



User(s) browsing this thread: 1 Guest(s)