HP Forums
Opposite of CONCAT()? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Opposite of CONCAT()? (/thread-12116.html)



Opposite of CONCAT()? - DrD - 01-06-2019 02:04 PM

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.


RE: Opposite of CONCAT()? - parisse - 01-06-2019 02:25 PM

from CAS: a1[:,3..4]


RE: Opposite of CONCAT()? - DrD - 01-06-2019 04:08 PM

Thanks, Parisse! Peace, and Happy New Year to you!

-Dale-


RE: Opposite of CONCAT()? - compsystems - 01-06-2019 05:25 PM

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