Post Reply 
CONCAT DOESN'T WORK CORRECTLY.
08-10-2014, 01:11 AM (This post was last modified: 08-10-2014 01:14 AM by John P.)
Post: #1
CONCAT DOESN'T WORK CORRECTLY.
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.
Find all posts by this user
Quote this message in a reply
08-10-2014, 07:53 AM
Post: #2
RE: CONCAT DOESN'T WORK CORRECTLY.
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)]
Find all posts by this user
Quote this message in a reply
08-10-2014, 01:28 PM
Post: #3
RE: CONCAT DOESN'T WORK CORRECTLY.
(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.
Find all posts by this user
Quote this message in a reply
Post Reply 




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