# Re: matrix

```On Mar 20, 10:46am, Vincent PAROUX Stagiaire ENIB wrote:
> I have a matrix 101 by 201 with values between 0 and 200. I would like
> to limit these values in my matrix between 60 and 120 .
> How can do it ?

Hi Vincent,

I am not entirely clear on what you are trying to do, so I will give
situation.
I will assume that you can read the data in to ferret with a correctly defined

If you want to leave your matrix alone and just work with the data
(e.g. plotting) then you can define a new variable that constrains the "legal"
data values. I.e., lets say that the variable you have on the 101*201 matrix is
called "DATA" - then you can define a new variable (say "CDATA") like this:

yes? let CDATA = if DATA ge 60 and DATA le 120 then DATA

All the values of DATA that are outside the range 60 to 120 will be now defined
as "Bad Values" in CDATA. You can then plot them like this:

If you want to constrain the data to 60-120 WITHOUT any bad data points (i.e.
all values less than 60 reassigned to 60, and all values greater than 120
assigned the value 120) then you can do the following

yes? let LDATA = if DATA lt 60 then 60 else DATA
yes? let CDATA = if LDATA gt 120 then 120 else LDATA

then you can again plot as follows:

Hope this helps!  Mark

--
-------------------------------------------------------------------------------

Mark Verschell (verschell@coaps.fsu.edu)
Center for Ocean and Atmospheric Prediction Studies
Florida State University
2035 E. Paul Dirac Drive
R.M. Johnson Bldg. - Suite 200
Tallahassee, FL  32306-3041
(904) 644-6532              (904) 644-4841 (fax)

```

• References:
• matrix
• From: Vincent PAROUX Stagiaire ENIB