Am 12.10.2018 um 09:06 schrieb Riccardo (Jack) Lucchetti:
On Fri, 12 Oct 2018, Sven Schreiber wrote:


In some cases, you may want to apply the elimination operation to matrices that have more than one column. I'd modify your function as
...
The same goes for the duplication operation, I guess.

OK, I've only found the straightforward loop approach for this:
<hansl>
function matrix duplicate(const matrix vechA)

  matrix out = {}
  loop i=1..cols(vechA) -q
    out ~= vec(unvech(vechA[,i]))
  endloop
  return out
end function
</hansl>

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

cheers,
sven