###------------------------------------------------------------------------------------------------ ### TOPIC Data Analysis based on the Newton Interpolation Polynomial (NIP) ###------------------------------------------------------------------------------------------------ ### FILE NAME NIP_input_StudyCase_2_exp_B.txt ### DESCRIPTION INPUT FILE of NIP.pl (perl script) ### CREATED So 24 Mai 2015 17:15:31 CEST ### LAST MODIFIED So 7 Jun 2015 13:18:17 CEST ###------------------------------------------------------------------------------------------------ ### AUTHOR NIP.pl written by Amar Khelil, ### www.khelil.de, 2014-2015, All rights reserved ###------------------------------------------------------------------------------------------------ ### FURTHER INFOS See project description http://www.khelil.de/Ref_Projekte_Intern/Projekte_perl_NIP_EN.html ### Chapter 'Study Cases' ###------------------------------------------------------------------------------------------------ ### GENERAL CONDITIONS ###------------------------------------------------------------------------------------------------ ### The treatment steps: ### -1- READ the Input Data stored in SECTION INPUT_DATA ### (limited by literals __BEGIN_INPUT_DATA__, __END_INPUT_DATA__) ### -2- CALCULATE the b-coefficients of the NIP (Newton Interpolation Polynomial) N(X) ### N(X) = b0 + b1 (X-X0) + b2 (X-X0) (X-X1) + ... + bn (X-X0)...(X-X(n-1)) ### -3- ANALYSE the results ### The calculated coefficients will be used to calculate y-values as defined in SECTION ANALYSIS ### (limited by literals __BEGIN_ANALYSIS__, __END_ANALYSIS__) ### ### General reading principles: ### -1- Lines starting with '#' are comments. Comments are ignored. ### -2- Each data category is read within a dedicated SECTION {__BEGIN_SECTION__, __END_SECTION__} ### -3- Each single data is identified by means of a pattern (data_identifier data_value) ### Advantage : The items must not be ordered - except for the (xi,yi) values (data indices are ignored) ### Shortcoming: Data cannot be read, if the pattern has been damaged i.e. the data_identifier cannot be recognized! ### __BEGIN_INPUT_DATA__ ###------------------------------------------------------------------------------------------------ ### DESCRIPTION OF SECTION 'INPUT DATA' ###------------------------------------------------------------------------------------------------ ### To define the measurements points out of which the NIP is calculated ### -1- Number of (measurement) points to read ### -2- x-value of the first measurement point P0 = (x0, y0) ### -3- Delta_x = (xi+1 - xi) is the equi-distance between 2 consecutive x-values ### -4- The y-values starting from y0 to yN (Number of measures - 1): It is assumed Pi=(xi,yi) ###------------------------------------------------------------------------------------------------ Number of measures : 15 # X0 to X10, b0 to b10 x-value_00 : 0.0 Delta-x : 0.4 # # Beware: # -1- y-values MUST be entered in increasing order y0, y1,... yi, yi+1,... # the value-indices _i are not parsed in the current program version. # -2- The yi-values have been estimated using LibreOffice calc Y= EXP(X) # -3- ALL legal values (25) stored will be READ, BUT NOT MORE than the given number in 'Number of measures' (11) will be CONSIDERED, when solving the problem. # y-value_00 :1,0000000000 # X= 0 y-value_01 :1,4918246976 # X= 0.4 y-value_02 :2,2255409285 # X= 0.8 y-value_03 :3,3201169227 # X= 1.2 y-value_04 :4,9530324244 # X= 1.6 y-value_05 :7,3890560989 # X= 2.0 y-value_06 :11,0231763806 # X= 2.4 y-value_07 :16,4446467711 # X= 2.8 y-value_08 :24,5325301971 # X= 3.2 y-value_09 :36,5982344437 # X= 3.6 y-value_10 :54,5981500331 # X= 4.0 y-value_11 :81,4508686650 # X= 4.4 y-value_12 :121,5104175187 # X= 4.8 y-value_13 :181,2722418752 # X= 5.2 y-value_14 :270,4264074262 # X= 5.6 y-value_15 :403,4287934927 # X= 6.0 y-value_16 :601,8450378721 # X= 6.4 y-value_17 :897,8472916504 # X= 6.8 y-value_18 :1339,4307643944 # X= 7.2 y-value_19 :1998,1958951041 # X= 7.6 y-value_20 :2980,9579870417 # X= 8.0 y-value_21 :4447,0667476999 # X= 8.4 y-value_22 :6634,2440062779 # X= 8.8 y-value_23 :9897,1290587439 # X= 9.2 y-value_24 :14764,7815655773 # X= 9.6 __END_INPUT_DATA__ ###------------------------------------------------------------------------------------------------ ### DESCRIPTION OF SECTION ANALYSIS ### The following data determines which y-values will be recalculated using the (complete or incomplete) NIPs ###------------------------------------------------------------------------------------------------ __BEGIN_ANALYSIS__ # Characteristics of the Data Analysis # -1- Name of the function that has been interpolated is known # # -2- The x-values to recalculate have been chosen in such a manner that # - All the original values are recalculated # At least for the complete NIP there should be no differences between original and interpolated data. # # - New values INSIDE the original data range are recalculated # Check whether the NIP starts waving between the interpolation points # - which is a negative sign # # - New values OUTSIDE the original data range are recalculated # In most cases 'extrapolation' proves to work very poorly. # In this particular case it should work fine, because # the NIP must quite equalize the original function. # Name of interpolated function : EXP(X) Number of calculation points : 50 x-value_00 : 0.0 Delta-x : 0.2 # Following NIP will be examined: N14 (the complete one), N10 and N5 b-max_00 : 5 b-max_01 : 10 b-max_02 : 14 __END_ANALYSIS__ __END_OF_FILE__