Eg

function range_end(a,step,b)
  v = a:step:b
  if v[end] != b
    v = [v,b]
  end
  v
end

[1 4 ... ] is not a vector, but a matrix. You will need to transpose the
result if you want that. Also, if the range does not need to be
extended, it is left as is, should work fine in most applications, but
you can of course convert it.

Best,

Tamas

On Tue, Feb 03 2015, paul analyst <[email protected]> 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

Reply via email to