필터 지우기
필터 지우기

diff function (second derivative)

조회 수: 2 (최근 30일)
jakob ekwall
jakob ekwall 2016년 1월 25일
댓글: jakob ekwall 2016년 1월 25일
Say that I have an array A on which I apply the diff function in order to approximate the second derivative. After looking at the results I want to locate the values in A which generated a certain value in ddA. How would one do that?
A =
0.6715
1.2075
0.7172
1.6302
0.4889
1.0347
0.7269
0.3034
0.2939
0.7873
ddA=diff(A,2)
ddA =
-1.0262
1.4032
-2.0543 <--- This value is interesting
1.6871
-0.8536
-0.1156
0.4139
0.5030
How do I find the values in A which generated the interesting value in ddA?

채택된 답변

Walter Roberson
Walter Roberson 2016년 1월 25일
The N'th value of diff(A,2) is
A(N+2)-2*A(N+1)+A(N)
Note: the value of ddA that you show does not correspond to the value of A that you show.
  댓글 수: 1
jakob ekwall
jakob ekwall 2016년 1월 25일
Thanks!
They should correspond now.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by