Array concatenation: Difference between revisions

m
Line 2,226:
=={{header|MATLAB}} / {{header|Octave}}==
Two arrays are concatenated by placing the two arrays between a pair of square brackets. A space between the two array names will concatenate them horizontally, and a semi-colon between array names will concatenate vertically.
<lang MATLAB>>> a = [1 2 3];
>> b = [4 5 6];
 
a =
 
1 2 3
 
>> b = [4 5 6]
 
b =
 
4 5 6
 
>> concat = [a b]
 
concat =
 
1 2 3 4 5 6
 
>> concat = [a;b]
 
concat =
 
1 2 3
4 5 6</lang>
Line 2,257 ⟶ 2,242:
>> size(e)
ans =
3 1 4 2 312</lang>
 
3 4 12
 
</lang>
 
=={{header|Maxima}}==