findUniqueCounts

Version 1.0.0 (1,55 ko) par Number seven
Find unique cells in a cell array and where they occur.
6 téléchargements
Mise à jour 13 août 2021

Afficher la licence

findUniqueCounts(inputCell) returns a cell array with the unique cells in inputCell and where they occur. The contents of each cell must be an array.
function uniqueCounts = findUniqueCounts(inputCell)
Inputs
inputCell - the cell array to work on
Outputs
uniqueCounts - a (N_unique,3) cell array where each row contains the unique cells, where N_unique is the number of unique entries. The columns of uniqueCounts are organised as follows:
- Column 1: cell contents
- Column 2: cell index in inputCell
- Column 3: array containing the indices in inputCell where repetitions occur. The first entry of this array is the same as the entry in Column 2
Example:
If inputCell = {[0];
[0;1;2;3];
[7;1];
[5;4;4];
[0];
[0;1;2;3]};
then uniqueCounts is:
uniqueCounts = {[0],[1],[1,5];
[0;1;2;3],[2],[2,6];
[7;1],[3],[3];
[5;4;4],[4],[4]}

Citation pour cette source

Number seven (2024). findUniqueCounts (https://www.mathworks.com/matlabcentral/fileexchange/97522-finduniquecounts), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2021a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux

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.0.0