Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Array-concatenation/Julia/array-concatenation.julia
Normal file
9
Task/Array-concatenation/Julia/array-concatenation.julia
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