findUniqueCounts

Find unique cells in a cell array and where they occur.
6 descargas
Actualizado 13 ago 2021

Ver licencia

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]}

Citar como

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

Compatibilidad con la versión de MATLAB
Se creó con R2021a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.0.0