countStrings

版本 1.0.1 (1.3 KB) 作者: Eva-Maria Weiss
This is a very simple function, that counts (repeating) strings within a cell array and returns unique strings with corresponding number.
2.0 次下载
更新时间 2020/7/27

查看许可证

numberOfStrings = countStrings(string_ori,varargin)

The function selects the unique string entries (n) from a cell array with m string entries and counts their number/replicates.
It returns a cell array with the name of the unique string entries in the first column and the number of corresponding replicates in the second column.

numberOfStrings = countStrings(string_ori,sort)
Optionally the output can be sorted according to number. sort = 1: returns sorted output variable

引用格式

Eva-Maria Weiss (2024). countStrings (https://www.mathworks.com/matlabcentral/fileexchange/78640-countstrings), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2017b
兼容任何版本
平台兼容性
Windows macOS Linux
标签 添加标签

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.1

fix assigning bug

1.0.0