RE: r.mapcalc

Dieter,

maybe you can do something like:

r.mapcalc << EOF

...

EOF

I think the interpretation of the variables is easyer that way. There's no
need for the string character '.

Luís Franco
----------
Instituto das Comunicações de Portugal
email- luis.franco@icp.pt

-----Original Message-----
From: DIETER LEHMANN [mailto:lehmann@fh-nuertingen.de]
Sent: Wednesday, April 28, 1999 2:10 PM
To: grass@cecer.army.mil
Subject: r.mapcalc

Dear users:

I have the following problem:

I am writing on a script to transfer maps to a neural network.
(SNNS: Stuttgarter Neuronale Netzwerksimmulator, a real good
thing...)

For this, I need the raster values in a standard between 0 and 1. (or
the multiple, I'm working in grass4.2.1)

My major problem should be simple...How could I pass shell
variables to r.mapcalc?

The formula is something like this:
y=(x-xmin)/(xmax-xmin)

r.mapcalc $1_standard='((1000000.0*(("$1"-$minimum)/$delta)))'

where $1 ist the argument of the shell-script
          minimum = the minimum-value
       delta = the differenz between max and min

what is wrong?

Btw. Is someone working with Neural Networks and GRASS?

Thanks in advance

Dieter
_____________________________________

Dieter Lehmann
State University of applied Sciences
Schelmenwasen 4-8
D-72622 Nuertingen, Germany
lehmann@fh-nuertingen.de
Phone: +49 (0) 7022 404 Ext. 192 or Ext. 152
Fax: +49 (0) 7022 404 Ext. 166