On Fri, 17 Sep 2021, Riccardo (Jack) Lucchetti wrote:
The only thing I found missing, after some experimentation, is the
ability to use "end" for the starting element of the matric slice,
as in
<hansl>
y = x[end-2:]
</hansl>
Hmm, that seems to work OK here:
<gretl>
? x = seq(1,6)
Generated matrix x
? eval x[end-2:]
4 5 6
? x = mshape(seq(1,36),6,6)
Replaced matrix x
? eval x[end-2:,]
4 10 16 22 28 34
5 11 17 23 29 35
6 12 18 24 30 36
? eval x[,end-2:]
19 25 31
20 26 32
21 27 33
22 28 34
23 29 35
24 30 36
</gretl>
Allin