On Tuesday, February 3, 2015 at 4:54:28 AM UTC-8, paul analyst wrote:
>
> How to build (automaticly) a vector with a range of indivisible ?
> k=1
> l=11
> p=3
> I need  vec :
> [1 4 7 10 11 ]
> Paul
>
>
Why not simply:

a = append!([k:p:l], mod(a[end],p) == 0? [] : [l])

Normally, [k:p:l] won't include l - that's what makes this a bit strange.
Also, this makes a vector. If you want a matrix, you'll need to transpose 
(a').

Reply via email to