Solving Interpolation in Matlab?
2 views (last 30 days)
Show older comments
Can someone look over this, and tell me if I got the right idea on this. I just want a general idea if I got the questions right or not. My concerns are on problems 1 and 3. Not sure if I did those correctly, and they were probably the easiest ones. Thanks!
0 Comments
Answers (1)
John D'Errico
on 22 Feb 2016
Well, since it looks like I did problem 1a for you the other day, I might as well answer this.
THINK about the answers you got for problem 1b. Don't just write down some numbers and expect them to be correct. THINK ABOUT YOUR ANSWER. Does it make sense?
As you write it down, you seem to be implying that the function is increasing as it goes from 6.1, 6.2, 6.3, 6.4. LOOK AT THE PLOT. Is the function actually decreasing? Is it remotely possible that your answer is correct? NO!
Anyway, that is irrelevant, as problem 1b explicitly directed you to use interp1 to solve the problem. Did you do that? NO! So you need to redo that part. Your answers were totally wrong anyway.
A quick look at problem 2 seems to be reasonable.
As for problem 3a, it looks like the 2 point estimate for the slope (i.e., velocity) seems to be correct. But you were out to lunch on the 3 point estimate. A 3 point estimate for the first derivative would be a central difference. So try that one again.
2 Comments
John D'Errico
on 22 Feb 2016
NO. For problem 1b, you should do what it tells you to do! To quote the problem statement:
"1(b) Now use interp1 and linear interpolation to estimate the position of the object at 6.1, 6.2, 6.3, and 6.4 seconds."
Use the linear interpolation option, which is actually the default mode for interp1.
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!