nbocc = count(str, pattern)
nbocc = count(str, pattern,'IgnoreCase', true)
nbocc = count(str, pattern,'IgnoreCase', false)
| Parameter | Description |
|---|---|
| str | a string, string array or cell of strings. |
| pattern | a string or string array or cell of strings to find. |
| Parameter | Description |
|---|---|
| nbocc | a matrix of integer values. |
str = 'To make a mountain out of a molehill';
k = count(str, 'hill')
k = count(str, 'molehill')
k = count(str, 'Hill', 'IgnoreCase', true)
A = {'Nel', 'son'; 'Nelson', 'Modules'}
k = count(A, 'son')
A = ["Nel", "son"; "Nelson", "Modules"]
k = count(A, 'son')
| Version | Description |
|---|---|
| 1.0.0 | initial version |