hi,
I am currently developing a program that contains a table with two columns: 1)Elevation 2)Volume.
There is also a graph of Elevation vs Volume next to the table. 2 text boxes have been placed at the bottom of the graph so that user can enter a value of elevation at textbox1, and the program will call the volume at that elevation from the table and displays it in textbox2. Another concern is on the interpolation of the volume data from the table, if the elevation entered by user is in between the range of elevation in the table, for example
Data in table:
Elevation | Volume
1.000 | 50.000
1.100 | 60.000
1.200 | 70.500
Elevation entered by user: 1.156
Volume difference = (70.500-60.000)*[(1.156-1.100)/(1.200-1.100)] = 5.88
Hence, volume at 1.156 = 60.000 + Volume difference = 60.588
How to code to read the data in the table and apply the above formula to get the volume at the elevation as entered by user?
Thank you in advance.
I am currently developing a program that contains a table with two columns: 1)Elevation 2)Volume.
There is also a graph of Elevation vs Volume next to the table. 2 text boxes have been placed at the bottom of the graph so that user can enter a value of elevation at textbox1, and the program will call the volume at that elevation from the table and displays it in textbox2. Another concern is on the interpolation of the volume data from the table, if the elevation entered by user is in between the range of elevation in the table, for example
Data in table:
Elevation | Volume
1.000 | 50.000
1.100 | 60.000
1.200 | 70.500
Elevation entered by user: 1.156
Volume difference = (70.500-60.000)*[(1.156-1.100)/(1.200-1.100)] = 5.88
Hence, volume at 1.156 = 60.000 + Volume difference = 60.588
How to code to read the data in the table and apply the above formula to get the volume at the elevation as entered by user?
Thank you in advance.
Comment