On Thu, 18 Oct 2018, Sven Schreiber wrote:
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?)
Well, it can't do any harm, can it?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------