i have a text file having two columns heading "z","p","v","w","av","aw" containing numeric values.So i want a program to store these values in two different
arrays on which i can operate.
here is my text file:
z p v w av aw
-0.67001 6.54438 -0.01078 0.00001 -0.00987 0.00000
-0.65043 6.35235 -0.01081 -0.00014 -0.00981 0.00329
-0.63086 6.16032 -0.01083 -0.00028 -0.00976 0.00657
-0.61129 5.96829 -0.01086 -0.00034 -0.00969 0.00967
-0.59172 5.77623 -0.01089 -0.00038 -0.00961 0.01154
-0.57215 5.58411 -0.01096 -0.00035 -0.00945 0.01071
-0.55258 5.39199 -0.01103 -0.00034 -0.00929 0.00992
-0.53301 5.19987 -0.01109 -0.00033 -0.00911 0.00915
-0.51344 5.00767 -0.01119 -0.00038 -0.00887 0.01036
-0.49387 4.81547 -0.01131 -0.00042 -0.00862 0.01172
-0.47431 4.62327 -0.01141 -0.00044 -0.00832 0.01302
-0.45473 4.431 -0.01154 -0.00047 -0.00799 0.01445
-0.43516 4.23871 -0.01169 -0.00051 -0.00762 0.01589
-0.41559 4.04644 -0.01183 -0.00051 -0.00721 0.01725
-0.39602 3.85407 -0.01201 -0.00053 -0.00675 0.01879
-0.37645 3.66171 -0.01221 -0.00053 -0.00625 0.02029
Next i want to give a Z value as input and want my program to check if the given value of is present in my "z" list or not...if yes then produce
the corresponding "v" and "w"value respectively.
If the given Z value is not in the "z" list then find the linear interpolation between the values nearest(nearest above and below)
the given z value from the "z" list,to produce u and w value.
Thanks in advance ...i need it urgently.
These define arrays of 1 element each and initialize that element to 0. The size of these arrays do not change within the program so accessing any element other than the first (that at index 0) is to access an element that doesn't exist.