and pressure in the superheated steam tables requires a double interpolation. The same results are also plotted in the images below. Calculation of thermodynamic state variables of tetrafluorethane - R134a. Predifined Scilab function for interpolationĪfter running the Scilab instruction above, we’ll have displayed in the Scilab console: Interpolation Interpolated Real RelativeĪs you can see, the relative error of the interpolation is less than 2%. Mprintf("%s \t\t %s \t\t %s \t\t %s \n", "Interpolation", "Interpolated", "Real", "Relative") Legend("actual","sample points","interpolated points",2) Using a Scilab script, we are going to evaluate the interpolation function for the following angles α ( x values): 5, 15, 25, 35, 45, 55, 65, 75, 85. Evaluate the interpolation function for several input values and check the relative error. The above Scilab instructions will need to be saved in a file called lininterp1d.sci and loaded into the Scilab workspace before calling it. function =lininterp1d(axis,map,x)Įlseif ((x > axis(i))
0 Comments
Leave a Reply. |