central_diff.m

버전 2.0.0.0 (4.12 KB) 작성자: Robert Canfield
Calculates numeric gradient using second-order difference formula for unevenly spaced data
다운로드 수: 10.5K
업데이트 날짜: 2015/10/1

라이선스 보기

편집자 메모: This file was selected as MATLAB Central Pick of the Week

The central_diff function calculates a numeric gradient using second-order accurate difference formula for evenly or unevenly spaced coordinate data. It operates in a similar fashion to the MATLAB function, gradient, except that it permits only one independent variable, x, and correctly handles unevenly spaced values of the x-coordinate data. Accuracy is increased at the ends relative to the MATLAB gradient function, which uses only first-order forward or backward differences at the ends, by instead using second-order forward difference at the left end and second-order backward difference at the right end.

인용 양식

Robert Canfield (2025). central_diff.m (https://kr.mathworks.com/matlabcentral/fileexchange/12-central_diff-m), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2015b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Interpolation에 대해 자세히 알아보기
태그 태그 추가
도움

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

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
2.0.0.0

Second-order accurate forward and backward difference formulae are used now at the left and right ends, instead of first-order forward/backward differences at the ends. Logical operators & and | were replaced with && and ||, respectively.

1.0.0.0