Kronecker Delta

Given 2 subscripts, j & k, KronD will return 1 if j == k and 0 if j != k.
1.5K Downloads
Updated 26 Jan 2010

View License

Given 2 subscripts, j & k, KronD will return 1 if j == k and 0 if j != k.

A very simple function with only a single if-else statement. Saves a bit of typing when the Kronecker Delta is needed.

Cite As

Richard Rieber (2026). Kronecker Delta (https://www.mathworks.com/matlabcentral/fileexchange/26485-kronecker-delta), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Characters and Strings in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0