N-Point Central Differencing

버전 1.2.0.0 (2.28 KB) 작성자: James
Computes an n-point central difference of function f with spacing h.
다운로드 수: 1.2K
업데이트 날짜: 2012/4/11

라이선스 보기

Computes an n-point central difference of function f with spacing h.

Returns a vector df of same size as f.
Input f must be a vector with evenly spaced points.
Input n must be 3,5,7, or 9.

Differences for points near the edges are calculated with lower order.
For example, if n=5 and length(f)=10, then 3-point central differencing is used to calculate values at points 2 and 9, 2-point forward differencing is used for point 1, 2-point backward differencing is used for point 10, and 5-point central differencing is used for points 3-7.

Differencing formulae from: http://www.holoborodko.com/pavel/numerical-methods/numerical-derivative/central-differences/ Accessed 4/10/12.

인용 양식

James (2026). N-Point Central Differencing (https://kr.mathworks.com/matlabcentral/fileexchange/36123-n-point-central-differencing), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2011b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Shifting and Sorting Matrices에 대해 자세히 알아보기
도움

도움 준 파일: central_diff2(y,deltat,d,a)

버전 게시됨 릴리스 정보
1.2.0.0

Added automatic downgrading of n if length(f) < n.

1.1.0.0

Updated handling of erroneous inputs.

1.0.0.0