Items tagged with arraytools arraytools Tagged Items Feed

restart;
with(ArrayTools):
M1 := Matrix([[0, 0, b], [0, e, f]], order = Fortran_order);
row, col, var := SearchArray(M1);
M2 := Matrix([[0, 0, b], [0, e, f]], order = C_order);
row2, col2, var2 := SearchArray(M2);

I guess that's a bug.

For the following procedure how do I dynamically grow the array? Is an Array the right datatype for this task?

restart:
with(ArrayTools):
m:=<1,2,3,4|3,2,1,0|x,y,z,z0|a,a,a,a|b,b,b,b>;
lscol:=<seq(1-AddAlongDimension(m,2)[i],i=1..4)>;
m:=<m|lscol>;
UpperTriangle(m);

Hi all,

I wonder if there is a way to extract the upper/lower triangle entries from a matrix?

Basically, I want to creat a column vector of the none zero entries in "UpperTriangle(m);"

 

Also, aside, is there a way to quickly assign those entries...

 

Hi, i'm trying to change Matrix([[9,8,7],[6,5,4],[3,2,1]]) into Matrix([[1,2,3],[4,5,6],[7,8,9]]). I try to use FlipDimension, it works with two steps, but i cant seem to fit it into one step. Is there a simplier thing that i could do please? Thanks.

Page 1 of 1