% levicivita
% e = levicivita(I,Dim)
%
% Returns the levi civiata of the input indices. When Dim == 1, each
% column is seen as a vector of indices. When Dim == 2, each row is seen
% as a vector of indices. Dim defaults to 1 when unspecified.
%
% levi civiata is defined as follows
% | -1 if indices are an odd permutation. i.e. [1,3,2], [3,2,1],...
% e = | +1 if indices are an even permutation. i.e [1,2,3], [3,1,2],...
% | 0 if any of the indices are equal. i.e. [1,1,1], [3,2,2],...
%
% Example
% [I{1:3}] = ndgrid(1:3,1:3,1:3); % All 3D subscripts
% I = [I{1}(:) I{2}(:) I{3}(:)]; % 3D subscripts, i,j,k
% e = levicivita(I,2) % Levi civiata for 3D
%
% levicivita([1 2 3 4].') % Levi civiata for 4D
%
% See also
% levicivita permutationparity
%
Zitieren als
Pierce Brady (2024). levicivita (https://www.mathworks.com/matlabcentral/fileexchange/26515-levicivita), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0.0 |