Question: Matrix polishing

Hi,

I'm sort of new with Maple and programming so I would like to ask a couple of questions related to Matrix polishing / changing numbers in Matrix. The example code is as follows:

> Errorterm:=0.1:
> A:=matrix(2,2,[4, 12, 2, 0.04]);
 
> for i from 1 to 2 do
       for j from 1 to 2 do
          if (A[i,j]<Errorterm)
          then A[i,j]:=0
         else A[i,j]=A[i,j]
        end if;
     od;
     od;
> eval(A);

> B:=matrix(2,2,[12*s+4, 12, 2*s, 0.04]);

The questions are:

1) Is there some automated way or specific command to  set the matrix elements to certain value when they are below some predetermined criteria (here set by Errorterm)?

2) Is there some way to to find the maximum and minimum element values of the Matrix?

3) (The main question:) Considering matrix-B, how can I transform 0.04 to 0  (or similar case when the numbers of elements is too large to do it manually) in Matrix that has symbols in it?   

Please Wait...