answersLogoWhite

0

#include
#include
void main()
{ int i, n, j, k, l ;
float xo, y[20], f[10][10],X[10],Y[10],h,u,p;
clrscr();
printf("Enter the value of n(No.of data pairs - 1) : \n");
scanf("%d" ,&n);
printf("Enter the initial value of x :\n ");
scanf("%f" ,&xo);
printf("Enter the step size h :\n ");
scanf("%f",&h);
printf("Enter the values of y\n");
for(i=0;iscanf("%f" ,&y[i]);
printf("Enter the required no. of interpolated values of y :\n ");
scanf("%d" ,&l);
printf("Enter the %d values of X for which values of y are required :\n",l);
for(k=0;kscanf("%f" ,&X[k]);
for(j=0;jf[0][j]=y[j];
for(i=1;ifor(j=0;jf[i][j]=f[i-1][j+1]-f[i-1][j];
for(k=0;k{ u=(X[k]-xo)/h;
Y[k]=y[0];
p=1;
for(i=1;i{ p=p*(u-i+1)/i;
Y[k]=Y[k]+p*f[i][0];
}
printf("The values of X and Y are : %f\t%f\n",X[k],Y[k]);
}
getch();
}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How can I use scipy.interpolate.griddata to perform interpolation on gridded data?

To use scipy.interpolate.griddata for interpolation on gridded data, you need to provide the grid points and corresponding values, along with the points where you want to interpolate. The function will then estimate the values at those points using interpolation techniques such as nearest neighbor, linear, or cubic.


How can I use the interpolate.griddata function to perform interpolation on my data points?

To use the interpolate.griddata function for interpolation on your data points, you need to provide the function with your data points, the grid points where you want to interpolate, and the method of interpolation you want to use. The function will then calculate the interpolated values at the grid points based on your data.


Which types of task can perform in the edit can you make the program in it?

you can perform in the edit prompt? can we make the programme in it?


Which type of task you can perform in the EDIT prompt can we make the program in it.?

you can perform in the edit prompt? can we make the programme in it?


Which types of task you can perform in the edit prompt can we make the program in it?

you can perform in the edit prompt? can we make the programme in it?


How can Python be used for 2D interpolation on an irregular grid?

Python can be used for 2D interpolation on an irregular grid by utilizing libraries such as SciPy and NumPy. These libraries provide functions that can interpolate data points on an irregular grid to estimate values at new points within the grid. By using these libraries, Python can efficiently perform 2D interpolation on irregular grids for various applications in data analysis and visualization.


How do you convert shore a hardness to newtons?

To convert Shore A hardness to Newtons, you need to perform a specific calculation using the material's properties. There is no direct conversion between the two; it depends on the specific material being tested and its unique characteristics. It is recommended to consult material data sheets or testing standards to determine the appropriate conversion formula for your material.


How can one accurately perform solenoid force calculations?

To accurately perform solenoid force calculations, one must use the formula F (N2 A) / (2 g2), where F is the force in Newtons, N is the number of turns in the solenoid, is the permeability of the material, A is the cross-sectional area of the solenoid, and g is the length of the solenoid. By plugging in the appropriate values and units into this formula, one can calculate the force exerted by a solenoid accurately.


How to perform 2-D separable Interpolation by zero-order function to a 2D image?

This might be a 2D image of what you want. Refer to the related link showing 2d magnetic fields.


What is system application?

its somethinmg to do with windows and powerpoint and exel


What is utility programme in a computer?

Programmes in computer are step by step instructions that are design to enble the computer operate and perform a specific task


Clear idea about software?

a software is a set of different programmes logically related to each other. a programme is a set of instructions written to perform a specific task..... a software is made to solve or to perform a particular function or task.