Post Reply 
CONCAT/APPEND/PREPEND CAS FUNCTION
07-30-2016, 03:08 AM (This post was last modified: 08-08-2016 03:07 AM by compsystems.)
Post: #1
CONCAT/APPEND/PREPEND CAS FUNCTION
CONCAT(ARG1, ARG2) FUNCTION CAS Example

FIRST ARGUMENT A MATRIX OR VECTOR ARRAY or LISTS with matrix dimension (nxm)
mat1 := [[a,b],[c,d]] [Enter] returns [[a,b],[c,d]] Matrix (2rowsx2cols) OK

Case 1:

vec1 := [[1],[2]] [Enter] returns [[1],[2]] Matrix (2rowsx1cols) or Column Vector (2 Elements) OK

concat(mat1,vec1) returns [[a,b,1],[c,d,2]] Matrix (2rowsx3cols) OK Concatenates to the right, because the second argument is a column vector

Case 2:

vec2 := [[3,4]] [Enter] returns [[3,4]] Matrix (1rowsx2cols) or Row Vector (2 Elements) OK


concat(mat1,vec2) returns [[a,b],[c,d],[3,4]] Matrix (3rowsx2cols) OK Concatenates down, because the second argument is a row vector

Case 3:

vec3 := [[3,4,5]] Returns [[3,4,5]] Matrix (1rowsx3cols) or Row Vector (3 Elements) OK

concat(mat1,vec3) returns [[a,b]],[c,d], [3,4,5]] Concatenates down because the second argument is a row vector with more columns than the firts argument

but (to put the answer to the entry line [up] [copy] show empty elements)

[up] [copy] [[a,b, □],[c,d, □],[3,4,5]] Matrix (3rowsx3cols) WITH EMPTY ELEMENTS (□)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
CONCAT/APPEND/PREPEND CAS FUNCTION - compsystems - 07-30-2016 03:08 AM
RE: - compsystems - 07-30-2016, 12:37 PM
RE: - compsystems - 07-30-2016, 12:33 PM
RE: - compsystems - 07-30-2016, 02:12 PM
RE: - compsystems - 07-30-2016, 02:47 PM



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