Counting incidence of compliance with logic statement within file
Hallo,
I've been trying to come up with the best approach to generate a wind rose from wind data. A wind rose categorises wind speed and direction and counts the number of times there is a wind within speed and direction bounds.
This information is eventually expressed as a probability table. e.g.
.......Speed...0-10.....10-20.......30-40.........Total
...Direction
.........0-90.....10............0............0............... 10
.....90-180.....40............3............0.............. .70
...180-270.......0..........10..........10............... 20
........Total:....50..........40..........10...... .......100
At the moment the data is kept in .txt files in this kind of format:
Speed Direction
12.0 10
15.3 90
20.4 180
I've thought of reading files into arrays, using vectors and all sorts of things but at getting nowhere. Some expert advice as to where to start would be most appreciated.
Thanks,
Will