N-Point Central Differencing

Version 1.2.0.0 (2,28 ko) par James
Computes an n-point central difference of function f with spacing h.
1,2K téléchargements
Mise à jour 11 avr. 2012

Afficher la licence

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.

Citation pour cette source

James (2024). N-Point Central Differencing (https://www.mathworks.com/matlabcentral/fileexchange/36123-n-point-central-differencing), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2011b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Shifting and Sorting Matrices dans Help Center et MATLAB Answers
Remerciements

A inspiré : central_diff2(y,deltat,d,a)

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
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