필터 지우기
필터 지우기

Solving Interpolation in Matlab?

조회 수: 3 (최근 30일)
Nick Haufler
Nick Haufler 2016년 2월 22일
댓글: John D'Errico 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에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by