'ismember' for cell arrays with various data types

Version 1.1 (2,11 ko) par Wei-Rong Chen
'cellismember' is a function that performs 'ismember' on cell arrays with various data types
205 téléchargements
Mise à jour 16 avr. 2015

Afficher la licence

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

Citation pour cette source

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. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2012a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Data Types dans Help Center et MATLAB Answers

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

Bug fixed.

1.0.0.0