Docsity

numerics for electrical engineering, Assignments of Numerical Methods in Engineering

Toggle sidebar
bg1
Computational Assignment
Develop a MATLAB program that that will measure the performance of linear ,quadratic and
cubic(natural) spline interpolations .
your code should do the following tasks
Input data (xi,yi) ,i=1 ,2,3,4……..n
Solve the functions f1,f2,f3………..fn-1
Compute the coefficients
Error plot from the exact values
Test your codes on the following functions � � = 1
1+25�2
Interpolate the function at
a) 5 equally spaced points between -1 and 1
b) 11 equally spaced points between -1 and 1
c) 21 equally spaced points between -1 and 1
Plot your solutions for each case and compare your answers to the true function

Partial preview of the text

Download numerics for electrical engineering and more Assignments Numerical Methods in Engineering in PDF only on Docsity!

Computational Assignment

Develop a MATLAB program that that will measure the performance of linear ,quadratic and cubic(natural) spline interpolations. your code should do the following tasks  Input data (xi,yi) ,i=1 ,2,3,4……..n  Solve the functions f 1 ,f 2 ,f 3 ………..fn-  Compute the coefficients  Error plot from the exact values Test your codes on the following functions 𝐀 𝐀 = 1 1+25𝐀^2 Interpolate the function at a) 5 equally spaced points between -1 and 1 b) 11 equally spaced points between -1 and 1 c) 21 equally spaced points between -1 and 1 Plot your solutions for each case and compare your answers to the true function