Am 23.05.2017 um 12:08 schrieb Riccardo (Jack) Lucchetti:
On Tue, 23 May 2017, Sven Schreiber wrote:
> Or I could do 'myresids[mrandgen(i, 1, T, H, 1)]', which should work
> for any H and would hopefully be efficient (?). However, IMHO it's not
> easily readable, because only the parameter H is actually really
> important in this context, the rest is just confusing syntax.
IMO if you split the above action into two, the code is readable enough:
<hansl>
ndx = mrandgen(i, 1, T, H, 1)
myboot = myresids[ndx]
</hansl>
Hm, still not optimal for my taste, but maybe we can have incremental
progress:
What about making the col-Parameter (the trailing one) optional with
default 1? So if one writes mrandgen(i, 1,T, H) it would be understood
that a column vector of length H is wanted.
thanks,
sven