HP Forums

Full Version: Opposite of CONCAT()?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
CONCAT(matrix,identity(n)) is used to form an intermediate result. A later operation needs to remove identity(n) from the result:

Example:

a:=[[1,3],[2,7]];
a:=CONCAT(a,identity(2));
a1:=RREF(a); // The concatenation of identity(2), and a^-1

I was hoping for something similar to these ideas, (to remove identity(n) from a concatenation):
// SUPPRESS(a1,identity(2));
// remove(identity(2),a1);
// SUB(a1,a1-identity(2));

Treating identity(n) as an object, fails.
from CAS: a1[:,3..4]
Thanks, Parisse! Peace, and Happy New Year to you!

-Dale-
But you have to specify where the index flag starts. I found a visualization BUG (history view)

a1 :=
[ [1,0,7,-3],
[0,1,-2,1] ]

'index':=1 [↵] "[] index start 1"

// row#1: [ 1, 0, 7, -3 ], row#2: [0, 1, -2, 1]
// col#3: [ 7, -2 ], col#4: [ -3, 1 ]

a1[:, 3..4 ] [↵] [[7,-3],[-2,1]] // ok, extract all rows from 1 to 2 and columns from 3 to 4

a1[:, 3..4 ] => a1[1 .. 0-1 ,3 .. 4] (history view) 0-1 I do not know what this means.

Here is an Bug of visualization, it should show

a1[:, 3..4 ] => a1[2 .. 1 ,3 .. 4] or a1[1 .. 2 ,3 .. 4] but not a1[1 .. 0-1 ,3 .. 4]

========================

'index':=0 [↵] "[] index start 0"

// row#0: [ 1, 0, 7, -3 ], row#1: [0, 1, -2, 1]
// col#3: [ 7, -2 ], col#4: [ -3, 1 ]

a1[:,2..3] [↵] [[7,-3],[-2,1]] // ok, extract all rows from 0 to 1 and columns from 2 to 3

a1[:,2..3] => a1[0 .. -1 ,3 .. 4] ??? [↨up] [up] [copy]=> a1[0 .. -1, 2 .. 3]

Here is an Bug of visualization, it should say
a1[:, 2..3 ] => a1[0 .. 1 ,2 .. 3] or a1[1 .. 0 ,2 .. 3] but not a1[0 .. -1 ,3 .. 4]

a1[:,3..4] [↵] [[-3],[1]] // ok, extract all rows 0 to 1 and columns from 3
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :