11/4/2023 0 Comments Matlab interp1 for extrapolationThe algebra involved gets somewhat complicated, so we will skip it here, but such an approach is called a cubic spline. Since we don't actually care if the cubic matches the data points at or, we could instead insist that our cubic had the correct derivatives at the two points we actually care about. (If you zoom in on the graph above, you can see that the dotted red line, which is one of our best fit cubics, exactly matches the four neighboring data points at, , and, but we only used that curve to interpolate between and. There are several methods for finding smooth interpolations, and almost all of them are based on the same idea: We are creating our best fit cubic using four data points, but it only actually has to match two of them. We are often interested in finding smooth interpolations without any such corners. It's hard to tell unless you zoom in quite close, but our interpolation function is not smooth: There are still sharp corners at each data point. This is called a cubic interpolation, but it is probably not what you will find if you look up cubic interpolations online, because our version has a problem. You can often ensure that your solutions are highly accurate at those grid points, but it is still important to know how the solution behaves in between them. For instance, when solving a partial differential equation numerically, you typically only find the solution at regularly spaced grid points instead of an arbitrary. ![]() Such situations also arise in a purely mathematical context. The position data from this technology are quite accurate, but we need to fill in data for the rest of the body. For example, you might use motion capture technology to track the position of an actors joints (or set the positions of these joints when making an animation). A similar situation arises in computer graphics. To extend the battery life, these collars might only report their position every few hours. As you might imagine, it is difficult to change the battery on a collar/tag attached to a migrating bird or a wild python. The main constraint on tracking is not accuracy, but battery life. Modern GPS is extremely accurate, so the position data is often close enough to exact that we can treat our data as perfect. At regular time intervals, these collars report their position via a radio signal. ![]() ![]() For example, you might be tracking an animal using a GPS collar. However, there are other situations where we really trust our data points but simply don't have enough of them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |