Thanks for the reply, Sven. When I thought about it, I came to a similar
result.
Furthermore, Gauss' seqa function does actually do something different:
<hansl>
scalar trim_1 = 0.1
scalar ende = 40.2
scalar inc = 0.025
function matrix seqa (scalar start,
scalar inc,
scalar lenght)
matrix ret = zeros(floor(lenght),1)
ret[1] = start
matrix ret[2:] = inc
ret = cum(ret)
return ret
end function
sq = seqa(trim_1,inc,ende)
sq
<\hansl>
I should have read the Gauss manual more precise before :-)
Thank you.
Artur
2013/6/21 Sven Schreiber <svetosch(a)gmx.net>
Am 21.06.2013 11:08, schrieb Artur Tarassow:
> Hello,
>
> I just noticed that I cant use an arbitrary positive scalar as the third
> argument in the seq function.
> This does not work:
> matrix sq = seq(0.1,40.2,0.1)
>
> whereas this works:
> matrix sq = seq(0.1,40.2,1)
> sq
>
> Is there a reason for this limitation? For instance, Gauss' seqa
> function accepts any positive scalar.
>
I'm not sure what the original reason was, and I can see both pro and
contra arguments.
In any case it's quite easy to achieve what you want; let's call your
increment 1/x with x>1, then do:
seq(a*x,b*x)/x
In your example: seq(1,402)/10
-sven
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users