Am 17.10.2018 um 23:57 schrieb Riccardo (Jack) Lucchetti:
On Wed, 17 Oct 2018, Sven Schreiber wrote:

Am 12.10.2018 um 09:06 schrieb Riccardo (Jack) Lucchetti:

The same goes for the duplication operation, I guess.


If you have some more efficient indexing trick, let me know.

How about this?

<hansl>
function matrix duplicate(const matrix vechA)
    e = vec(unvech(seq(1,rows(vechA))'))
    return vechA[e,]
end function
</hansl>

Thanks, but actually I forgot what I had written before: duplicate is quite simple and therefore just mention it. (Or do you think the multiple-columns case makes it worthwhile as an extra function?)

cheers,
sven