From: Ravindra Dwivedi on
Hi Group,

I've a file which contains numbers and letters, for example:

------------------------------------------------------------------------------------------------------------------
CUMULATIVE VOLUMES L**3 RATES FOR THIS TIME STEP L**3/T
------------------ ------------------------

IN: IN:
--- ---
STORAGE = 0.0000 STORAGE = 0.0000
CONSTANT HEAD = 2930.6899 CONSTANT HEAD = 293.0690

TOTAL IN = 2930.6899 TOTAL IN = 293.0690

OUT: OUT:
---- ----
STORAGE = 0.0000 STORAGE = 0.0000
CONSTANT HEAD = 2930.6899 CONSTANT HEAD = 293.0690

TOTAL OUT = 2930.6899 TOTAL OUT = 293.0690

IN - OUT = 0.0000 IN - OUT = 0.0000

PERCENT DISCREPANCY = 0.00 PERCENT DISCREPANCY = 0.00




%%%%%%%% STEADY STATE FLOW %%%%%%%%




TIME SUMMARY AT END OF TIME STEP 1 IN STRESS PERIOD 1
SECONDS MINUTES HOURS DAYS YEARS
-------------------------------------------------------------------
TIME STEP LENGTH 864000.0 14400.00 240.0000 10.00000 2.7378507E-02
STRESS PERIOD TIME 864000.0 14400.00 240.0000 10.00000 2.7378507E-02
TOTAL TIME 864000.0 14400.00 240.0000 10.00000 2.7378507E-02
1


******* SIMULATION TIME = 73.2969 SECS *******

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

I have hundreds of such files. I'd like matlab to read each of such files, and look for "TOTAL OUT" and " PERCENT DISCREPANCY " words. In fact , I know that these words appear on lines 23 and 27 , if I start counting from last line in the file. After that, if it is able to find the words total out and percent discrepancy, then I'd like it to print out the numbers after them. For example, 293.0690 and 0.00 as mentioned in the above file. Would you please let me know how can I do this?

Thanks!