circular diff

diff with wrap-around differences, same sized output matrix

Sie verfolgen jetzt diese Einreichung

difc is a wrapper for matlab's diff() and takes the same arguments.

The returned matrix size is the same as the input matrix size, like matlab's gradient().

Higher N works using recursion.
Zero N returns the input matrix.

Zitieren als

Petorr (2026). circular diff (https://de.mathworks.com/matlabcentral/fileexchange/44701-circular-diff), MATLAB Central File Exchange. Abgerufen .

Quellenangaben

Inspiriert: center_finite_diff.m

Allgemeine Informationen

Kompatibilität der MATLAB-Version

  • Kompatibel mit allen Versionen

Plattform-Kompatibilität

  • Windows
  • macOS
  • Linux
Version Veröffentlicht Versionshinweise Action
1.1.0.0

Previous version had faulty automatic dimension assignment when the function is called with a single argument.

It has been updated to match diff() defaults for vector, matrix and N-dim arrays.

1.0.0.0