uniqueCells

バージョン 1.2.1 (2 KB) 作成者: Konrad
Implementation of unique for ND cell arrays of mixed type. Avoids num2str and provides switches for unique rows and to treat NaNs as equal.
ダウンロード: 40
更新 2018/8/13

ライセンスの表示

[ outcell, iIn, iOut ] = uniqueCells( incell [, 'rows', 'equalnan'] )

Usage is similar to unique().
The 'rows' switch returns unique rows in a matrix of cells. Otherwise, ND cell arrays are supported.
The 'equalnan' switch treats NaNs as equal.

As sorting is not possible for mixed-type cells the output corresponds to
the 'stable' switch in unique(). The occurrence-switch of unique() is NOT
implemented.

The following is true (w/o the 'rows' switch'):
isequal(incell(iIn), outcell)
isequal(outcell(iOut), incell)

Using the 'rows' switch:
isequal(incell(iIn,:), outcell)
isequal(outcell(iOut,:), incell)

The algorithm performs exhaustive pairwise comparisons using isequal
making it exact and type-independent (in contrast to implementations
using num2str); however this may come at the expense of performance.

引用

Konrad (2026). uniqueCells (https://jp.mathworks.com/matlabcentral/fileexchange/68449-uniquecells), MATLAB Central File Exchange. に取得済み.

MATLAB リリースの互換性
作成: R2017a
R2007b 以降のリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersData Type Identification についてさらに検索
タグ タグを追加
バージョン 公開済み リリース ノート
1.2.1

Fixed typo.

1.2.0

Input checking, error handling & compatibility improved.

1.1.0