circular diff

diff with wrap-around differences, same sized output matrix

Download
Download

You are now following this Submission

Cite As

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

Acknowledgements

Inspired: center_finite_diff.m

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.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.

Download
1.0.0

Download