isrepetition: Determine TRUE or FALSE for repetition terms in a cell

Determine TRUE or FALSE for repetition terms in a cell % tfs = isrepetition(A)
163 Downloads
Updated 11 Jun 2012

View License

% tfs = isrepetition(A)
% linrenwen@gmail.com
% Example I
% if
% tfs = isrepetition({'1', '2', '1', '2', '3'})
% then
% tfs =
% 1 0 0
% 0 1 0
% 1 0 0
% 0 1 0
% 0 0 1
%
% Example II
% if
% A =
% '1' '2'
% '1' '3'
% '4' '3'
% tfs = isrepetition(A)
% then
% tfs(:,:,1) =
% 1 0
% 1 0
% 0 0
% tfs(:,:,2) =
%
% 0 1
% 0 0
% 0 0
% tfs(:,:,3) =
% 0 0
% 0 1
% 0 1
% tfs(:,:,4) =
% 0 0
% 0 0
% 1 0

Cite As

Renwen Lin (2024). isrepetition: Determine TRUE or FALSE for repetition terms in a cell (https://www.mathworks.com/matlabcentral/fileexchange/37095-isrepetition-determine-true-or-false-for-repetition-terms-in-a-cell), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Tables in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0