Solving Interpolation in Matlab?

3 次查看(过去 30 天)
Nick Haufler
Nick Haufler 2016-2-22
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!

回答(1 个)

John D'Errico
John D'Errico 2016-2-22
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 个评论
Nick Haufler
Nick Haufler 2016-2-22
So for problem 1b would I use the interp1 nearest command to find those values?
John D'Errico
John D'Errico 2016-2-22
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by