Kris Katterjohn <katterjohn <at> gmail.com> writes:
> addrow() doesn't modify the original matrix, but it returns another one with
> the added row:
>
> (%i2) M:matrix([0],[1])$
>
> (%i3) addrow(M,[2]);
> (%o3) matrix([0],[1],[2])
>
> (%i4) M;
> (%o4) matrix([0],[1])
>
> (I used display2d:false to print in this form instead of what you're probably
> used to seeing).
>
> Using instead M:addrow(M,[0,i]) inside your for loop should do the trick.
>
> Cheers,
> Kris Katterjohn
>
Hi Kris,
aaaaaaaaaah! This is really helpful. I did not expect addrow to return
anything. This way is works pretty well now.
Thx a lot!
Best
J.