I have two files, one with spatial data on every line (x,y,z); and one with the field value at every line. Each line in the spatial data file corresponds to the line in the other field value file.
spatial data:
(-2 2 0.1)
(-2 1.92708 0.1)
(-2 1.85417 0.1)
...
(4.92784 1.92708 0.1)
(5 1.85417 0.1)
...
etc
field value data:
4.35
8.90
5.6
44.4
3.4
.. etc
I would like to create a 2D array out of this. My x data: I have 98 points spaced evenly from -2 -> 5 My y data: I have 49 points spaced evenly from -1.5 -> 2
I want a 2D matrix of field value data of size 98x49, corresponding to the spatial position.
The problem is, my data is not in order, so I need to map the spatial (x,y) to its value. Then, I need to give it the proper 2D array index.
Thank you for your help!