CMPS1371 Introduction to Computing for Engineers. NUMERICAL METHODS. Interpolation. When you take data, how do you predict what other data points might be? Two techniques are : Linear Interpolation Cubic Spline Interpolation. Linear Interpolation.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
What is the corresponding value of y for this x?
Linear Interpolation – Connect the points with a straight line to find y
Both measured data points and interpolated data were plotted on the same graph. The original points were modified in the interactive plotting function to make them solid circles.
We can get an improved estimate by using the spline interpolation technique
Cubic Spline Interpolation. The data points on the smooth curve were calculated. The data points on the straight line segments were measured. Note that every measured point also falls on the curved line.
Evaluate how close a fit you’ve achieved by taking the difference between the measured and calculated points, and adding them up
Residuals are the difference between the actual and calculated data points
You can also access the data statistics window from the figure menu bar.
from the figure window.
This window allows you to calculate statistical functions interactively, such as mean and standard deviation, based on the data in the figure, and allows you to save the results to the workspace.
Data Statistics Window
The derivative of a data set can be approximated by finding the slope of a straight line connecting each data point
The slope is an approximation of the derivative – in this case based on data measurements
The slope of a function is approximated more accurately, when more points are used to model the function
>> product = df(1:end-1) .* df)2:end);
>> critical = xd(find(product < 0));
-5.2000 -1.9000 2.6000 5.8000 6.2000
The area under a curve can be approximated using the trapezoid rule.