HP Forums
CONCAT DOESN'T WORK CORRECTLY. - 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: CONCAT DOESN'T WORK CORRECTLY. (/thread-1949.html)



CONCAT DOESN'T WORK CORRECTLY. - John P - 08-10-2014 01:11 AM

The build in command CONCAT DOESN'T WORK CORRECTLY ON COMMAND LINE IN CAS MODE, but it works OK in PRGM. MODE. When I want to concatenate two list of lists of the same size ex. {{1,2},{3,4}} on the command line I get the matrix [[1 2 1 2][3 4 3 4]]. When lists are of different size {{1,2},{3,4},{5,5}} and {{1,2},{1,2}} I get the correct result {{1,2},{3,4},{5,5},{1,2},{1,2}}. In PRGM. MODE it works OK regardless the size.


RE: CONCAT DOESN'T WORK CORRECTLY. - parisse - 08-10-2014 07:53 AM

concat works correctly, the on-calc documentation is incomplete, concat(m1,m2) concatenates matrices line by line if m1 and m2 have the same number of lines.
If you want to glue matrices as if they were lists, you can do that:
[op(m1),op(m2)]


RE: CONCAT DOESN'T WORK CORRECTLY. - John P - 08-10-2014 01:28 PM

(08-10-2014 07:53 AM)parisse Wrote:  concat works correctly, the on-calc documentation is incomplete, concat(m1,m2) concatenates matrices line by line if m1 and m2 have the same number of lines.
If you want to glue matrices as if they were lists, you can do that:
[op(m1),op(m2)]

Thank you very much Sir.