Ah, never mind; I found it. I couldn't think of a good phrase to use to 
describe what I was trying to do, but then I realized that it should be 
called "repeated concatenation". Using this search term, I found that the 
command I am looking for is

repmat([6, 7], 2)


On Thursday, July 14, 2016 at 2:05:34 PM UTC-4, xdavidliu wrote:
>
> In Python, I can concatenate multiple copies of an array or tuple. For 
> example:
>
> >>> [6, 7] * 2
>
> [6, 7, 6, 7]
>
> In Julia, I have to manually enter each array as an argument:
>
> *julia> **vcat([6, 7], [6, 7])*
>
> *4-element Array{Int64,1}:*
>
> * 6*
>
> * 7*
>
> *6*
>
> * 7*
>
> Is there a way to do this in Julia using just the number 2 or N, without 
> having to enter the same array 2 or N times?
>

Reply via email to