Which are the type rules for concatenation?
The arrays that is concatenated must have the same number of dimensions.
The concatenation dimension k, that you use, must exist.
Arrays must have identical dimension sizes with the exception of the size of dimension k
Argument arrays must have equivalent maximally expanded element types, where the element type of the result array is the element type of the maximally expanded type of the arguments.
What will be the result of the arrays below?
array1 has the result {{22, 34, 15}, {66, 78, 52}}
array2 has the result {{22, 34, 15}, {66, 78, 52}}
array3 has the result {{11, 12}, {13, 14}}
array4 has the result {{7, 2}, {5, 42}, {24, 74}}
array5 has the result {{7, 2}, {5, 42}, {24, 74}}
array6 has the result {{1, 2}, {11, 12}, {13, 14}, {3, 4}}
array7 has the result {{1, 2, 35, 73}, {72, 51, 12, 23}}
Now it is your turn to concatenate arrays using cat:
Concatenate two 1x2-arrays along the first dimension.
Concatenate the arrays you just concatenated, but along the second dimension.
Concatenate one 2x3-array with a 2x1-array along the second dimension.
Concatenate two 2x2-arrays along the first dimension.
What are the results of the array concatenations?
These are examples of how you could concatenate the arrays in the exercise.
myArray1 has the result {{1, 2}, {11, 12}}
myArray2 has the result {{1, 2, 11, 12}}
myArray3 has the result {{21, 32, 43, 12}, {66, 77, 55, 24}}
myArray4 has the result {{10, 40}, {55, 78}, {20, 50}, {31, 22}}
The last thing you should do now is to concatenate three arrays with higher dimension.
So, the arrays you should concatenate are of size 1x2x1, 1x2x2 and 1x2x3 and they should be concatenated along the first dimension. Do the concatenation in the class MoreConcat below.
What is the result after the concatenations?
This is an example of how you could concatenate the arrays in the exercise.
aReady has the result {{1, 3, 4, 7, 8, 9}, {2, 5, 6, 10, 11, 12}}