Data update
This commit is contained in:
parent
81fd053722
commit
52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions
9
Task/Array-concatenation/Julia/array-concatenation.jl
Normal file
9
Task/Array-concatenation/Julia/array-concatenation.jl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
a = [1,2,3]
|
||||
b = [4,5,6]
|
||||
ab = [a;b]
|
||||
# the above bracket notation simply generates a call to vcat
|
||||
ab = vcat(a,b)
|
||||
# hcat is short for `horizontal concatenation`
|
||||
ab = hcat(a,b) #ab -> 3x2 matrix
|
||||
# the append!(a,b) method is mutating, appending `b` to `a`
|
||||
append!(a,b) # a now equals [1,2,3,4,5,6]
|
||||
Loading…
Add table
Add a link
Reference in a new issue