Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
A textbook of Computer Based Numerical and Statiscal Techniques part 61. By joining statistical analysis with computer-based numerical methods, this book bridges the gap between theory and practice with software-based examples, flow charts, and applications. Designed for engineering students as well as practicing engineers and scientists, the book has numerous examples with in-text solutions. | 586 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES for i 0 i n-j i diff i j diff i 1 j-1 -diff i j-1 i 0 do i while ax i x i- - p x-ax i h y1 p diff i-1 1 y 2 p p 1 diff i-1 2 2 y3 p 1 p p-1 diff i-2 3 6 y4 p 1 p p-1 p 2 diff i-3 4 24 y ay i y1 y2 y3 y4 printf when x 6.4f y 6.8f x y printf press enter to exit getch OUTPUT Enter the no. of term -7 Enter the value in form of x- Enter the value of x1 - 1.00 Enter the value of x2 - 1.05 Enter the value of x3 - 1.10 Enter the value of x4 - 1.15 Enter the value of x5 - 1.20 Enter the value of x6 - 1.25 Enter the value of x7 - 1.30 Enter the value in the form of y- Enter the value of y1 - 2.7183 Enter the value of y2 - 2.8577 Enter the value of y3 - 3.0042 Enter the value of y4 - 3.1582 Enter the value of y5 - 3.3201 Enter the value of y6 - 3.4903 Enter the value of y 7 - 3.6693 COMPUTER PROGRAMMING IN C LANGUAGE 587 Enter the value of x for Which you want the value of y - 1.35 When x 1.35 y 3.8483 Press enter to exit 13.20 ALGORITHM FOR STIRLING S METHOD Step 1. Start of the program to interpolate the given data Step 2. Input the value of n number of terms Step 3. Input the array ax for data of x Step 4. Input the array ay for data of y Step 5. Compute h ax 1 - ax 0 Step 6. For i 0 i n-1 i Step 7. diff i 1 ay i 1 -ay i Step 8. End of the loop i Step 9. for j 2 j 4 j Step 10. for i 0 i n-j i Step 11. diff i j diff i 1 j-1 - diff i j-1 Step 12. End of the loop i Step 13. End of the loop j Step 14. i 0 Step 15. Repeat step 16 until ax i x Step 16. i i 1 Step 17. i i-1 Step 18. p x - ax i h Step 19. y1 p diff i 1 diff i - 1 1 2 Step 20. y2 p p diff i - 2 2 2 Step 21. y3 p p p-1 diff i - 1 3 diff i-2 3 6 Step 22. y4 p p p p-1 diff i - 2 4 24 Step 23. y ay i y1 y2 y3 y4 Step 24. Print the output x y Step 25. End of the program. 13.21 PROGRAMMING FOR STIRLING S METHOD include stdio.h include conio.h include math.h include string.h include process.h 588 COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES void main int n int