hazeeel 0 Junior Poster in Training

Hey guys

How do I do a calculation of coordinates X,Y,Z between 2 files.
Eg. File 1 has about 1000 lines and so does File 2

I have done the pre processing for the coordinates that are needed to be extracted out. They are kept in my 2D arrays.

This is an extract of my arrays from File 1

coordinates1[i][0]= Double.parseDouble(text1.substring(30,38));//X
coordinates1[i][1]= Double.parseDouble(text1.substring(38,46));//Y
coordinates1[i][2]= Double.parseDouble(text1.substring(46,56));//Z

And now I wish to find out the difference of the 1st set of X,Y, Z coordinates from File 1 to that of every set of File 2. In other words, I wish to find out the diff of the first row of coordinates (which consists on X, Y and Z respectively) to that of every row from File 2.

Eg,
File 1, row 1 coordinates X, Y, Z - File 2 row 1 coordinates X, Y, Z
File 1, row 1 coordinates X, Y, Z - File 2 row 2 coordinates X, Y, Z
File 1, row 1 coordinates X, Y, Z - File 2 row 3 coordinates X, Y, Z
etc etc.


How should I go about doing this? Please advice!!