'ismember' for cell arrays with various data types

バージョン 1.1 (2.11 KB) 作成者: Wei-Rong Chen
'cellismember' is a function that performs 'ismember' on cell arrays with various data types
ダウンロード: 205
更新 2015/4/16

ライセンスの表示

The built-in "ismember" function in MATLAB fails to perform when the input variables are cells containing different types of variables.
% This function 'cellismember' is a function that performs 'ismember' on
% cells with various data types.
% The input A and B must be cell arrays.
% Example:
% Input: A = {'ab','cd', NaN, [], 5, 1}; B = {[], 'cd', NaN, 1};
% output: Lia = [0 1 1 1 0 1];
%
% Acknowledgement:
% This function greatly benefits from Jan Simon's comments. The previous version was errorful.
% See 'ismember' for more information
% Weirong Chen Apr-16-2015

引用

Wei-Rong Chen (2024). 'ismember' for cell arrays with various data types (https://www.mathworks.com/matlabcentral/fileexchange/50474-ismember-for-cell-arrays-with-various-data-types), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2012a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersData Types についてさらに検索
タグ タグを追加

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.1

Bug fixed.

1.0.0.0