How can I fix the next code in Julia so I try to Program a function that generates samples without replace?
I have the next code in Julia but the problem is when I use the vector p = [0.2,0.1,0.1,0.15,0.17] with n = 3 appears the next: BoundsError: attempt to access 4-element Vector{Float64} at index [5]. Could you help me?