###------------------------------------------------------------------------------------------------ ### TOPIC Data Analysis based on the Newton Interpolation Polynomial (NIP) ###------------------------------------------------------------------------------------------------ ### FILE NAME NIP_input_StudyCase_4_sqrt.txt ### DESCRIPTION INPUT FILE of NIP.pl (perl script) ### CREATED So 24 Mai 2015 20:54:44 CEST ### LAST MODIFIED Sa 6 Jun 2015 10:00:56 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 : 11 x-value_00 : 0.0 Delta-x : 0.2 # # 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= SQRT(X + 1) # -3- ALL legal values (26) 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.0 y-value_01 : 1,0954451150 X = 0.2 y-value_02 : 1,1832159566 X = 0.4 y-value_03 : 1,2649110641 X = 0.6 y-value_04 : 1,3416407865 X = 0.8 y-value_05 : 1,4142135624 X = 1.0 y-value_06 : 1,4832396974 X = 1.2 y-value_07 : 1,5491933385 X = 1.4 y-value_08 : 1,6124515497 X = 1.6 y-value_09 : 1,6733200531 X = 1.8 y-value_10 : 1,7320508076 X = 2.0 y-value_11 : 1,7888543820 X = 2.2 y-value_12 : 1,8439088915 X = 2.4 y-value_13 : 1,8973665961 X = 2.6 y-value_14 : 1,949358869 X = 2.8 y-value_15 : 2 X = 3.0 y-value_16 : 2,0493901532 X = 3.2 y-value_17 : 2,0976176963 X = 3.4 y-value_18 : 2,144761059 X = 3.6 y-value_19 : 2,19089023 X = 3.8 y-value_20 : 2,2360679775 X = 4.0 y-value_21 : 2,2803508502 X = 4.2 y-value_22 : 2,3237900077 X = 4.4 y-value_23 : 2,3664319132 X = 4.6 y-value_24 : 2,4083189158 X = 4.8 __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 : SQRT(X+1) Number of calculation points : 42 x-value_00 : 0.0 Delta-x : 0.1 # The complete NIP=NIP(10) and NIP(5) has used to interpolate the data b-max_00 : 5 # Interpolation considers an x-range of about [0, pi] (half a period) b-max_01 : 10 # Interpolation considers an x-range of about [0,2pi] (the complete period) __END_ANALYSIS__ __END_OF_FILE__