## Determine dimension of array...

Hi,

I have the following input in order to obtain the dimension of an array, by means of the values has been assigned

with(ArrayTools):
with(LinearAlgebra):
f[1]:=1:
f[2]:=2:
nops(f);
Size(f);
Dimension(f);

The result is

---

1
[ 1 1 ]
Error, invalid input: LinearAlgebra:-Dimension expects its 1st argument, A, to be of type {Matrix, Vector} or coercible via `~Simplify`, but received f

---

I cannot get number "2", which is expected. Is there any way to obtain that? I looked for help and mapleprime, without any simple solution ......

Thank you very much!

## Is this a problem?...

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.

## Dynamically growing an Array/Vector...

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

## How to extract triangular matrix into a vector (co...

restart:
with(ArrayTools):
m:=<1,2,3,4|3,2,1,0|x,y,z,z0|a,a,a,a|b,b,b,b>;
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...