[Thread Prev][Thread Next][Index]

Re: catching time axis



Hi Mulyono,
You might be able to use the @EVNT transformation for this.
The result of @EVNT is an index, incremented every time the
event occurs., Here's a simple example, where the event is
that the variable diff crosses zero.  This results in the location
of the gridpoint just after the variable crosses zero; you could
interpolate to get the exact location of the crossings.
yes? ! make up two variables, take the difference
yes? let a = {1,0,4,6,7,2,4,7,9,12}
yes? let b = {3,4,5,6,2,3,4,5,12,11}
yes? let diff = a-b

yes? let e = diff[x=@evnt:0]
yes? list diff, e
             X: 0.5 to 10.5
 Column  1: DIFF is A-B
 Column  2: E is DIFF[X=@EVNT:0]
            DIFF      E
1    /  1: -2.000  0.000
2    /  2: -4.000  0.000
3    /  3: -1.000  0.000
4    /  4:  0.000  1.000
5    /  5:  5.000  1.000
6    /  6: -1.000  2.000
7    /  7:  0.000  3.000
8    /  8:  2.000  3.000
9    /  9: -3.000  4.000
10   / 10:  1.000  5.000

yes?  ! Take the first difference,
yes? let cross = e -  e[i=@shf:-1]

yes? list diff, e, cross
             X: 0.5 to 10.5
 Column  1: DIFF is A-B
 Column  2: E is DIFF[X=@EVNT:0]
 Column  3: CROSS is E -  E[I=@SHF:-1]
            DIFF      E  CROSS
1    /  1: -2.000  0.000   ....
2    /  2: -4.000  0.000  0.000
3    /  3: -1.000  0.000  0.000
4    /  4:  0.000  1.000  1.000
5    /  5:  5.000  1.000  0.000
6    /  6: -1.000  2.000  1.000
7    /  7:  0.000  3.000  1.000
8    /  8:  2.000  3.000  0.000
9    /  9: -3.000  4.000  1.000
10   / 10:  1.000  5.000  1.000

R Prabowo wrote:

Dear ferreters,

I have two different data files which have same time axis (L1 = L2). When I plot them together, at certain L values the graphs crossed each other.
The thing that I want is "to catch the time-axis-values at the time the two graphs crossed each other and to save the catched time axis into a file". Is there any one has experience doing such
thing.

Thank you very much.

Mulyono Prabowo

--
Mulyono R. Prabowo
PhD Candidate
School of Geography and Environmental Science
Monash University,
PO box 11A, Clayton, Victoria
AUSTRALIA, 3800
Telp  : +61 3 9905 9992
Fax   : +61 3 9905 2948
e-mail: rmpra2@student.monash.edu.au

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246
 


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement