Have you tried:


using Distributions

x = rand(Normal(0,1),(10,10))


That should work.


On Sunday, September 7, 2014 7:47:24 PM UTC-4, Christopher Fisher wrote:
>
> Hi all-
>
> I recently upgraded to Julia 0.3 and encountered a problem generating 
> matrices of random data using Distributions. I did not receive this error 
> with Julia 0.2. I receive the following error in both IJulia and terminal:
>
> using Distributions
> x = rand(Normal(0,1),10,10)
>
> `rand` has no method matching rand(::Normal, ::Int64, ::Int64)
> while loading In[8], in expression starting on line 2
>
>
>
>
>
> However, the following works:
>
>
> using Distributions
> x = rand(Normal(0,1),10)
>
>
> 10-element Array{Float64,1}:
>  -1.27113 
>   0.81187 
>   0.250986
>   1.01228 
>  -1.77785 
>   0.328616
>   0.122259
>   0.926345
>  -1.11857 
>   0.462382
>
>
> Any help would be much appreciated. 
>
>
> Chris
>
>
>
>

Reply via email to