If I understand correctly, you want hcat:
julia> hcat(v,w)
3x2 Array{Float64,2}:
1.0 2.0
2.0 4.0
3.0 6.0
The general version of that is `cat`.
On Tue, Sep 9, 2014 at 6:31 PM, Diego Tapias <[email protected]> wrote:
> Thanks for answering!, but what if I want to form a matrix of dimension 2
> and not an array of dimension 1.
>
> 2014-09-09 17:27 GMT-05:00 Stefan Karpinski <[email protected]>:
>
>> append!(v,w) – it modifies and returns v.
>>
>>
>> On Wed, Sep 10, 2014 at 12:25 AM, Diego Tapias <[email protected]>
>> wrote:
>>>
>>> Consider the arrays given by
>>>
>>> v = [1.,2.,3.]
>>>
>>> w = [2.,4.,6.]
>>>
>>> As you know both are arrays of dimension 1. I want to form the matrix
>>> with its columns given by v and w. How can I do that (I tried with “cat” but
>>> it didn’t worh)? How can it be generalized for n arrrays.
>>>
>>> Thanks in advance
>>
>>
>