I was just about to find use for the ..., 'ForceCellOutput', true) name-value pair argument for the strfind command, as is described in the reference docs for strfind:
Syntax
k = strfind(str,pattern) k = strfind(str,pattern,'ForceCellOutput',cellOutput))...
Return Indices in Cell Array
Find the occurrences of a pattern in a character vector. Force
strfindto return the indices of those occurrences in a cell array. Then display the indices.Create a character vector and find the occurrences of the pattern ain.
str = 'The rain in Spain.'; k = strfind(str,'ain','ForceCellOutput',true)
The above does, however, yields an error for me (Error using strfind: Too many input arguments), and I noticed (after the error occurred) that the 2nd syntax above is not included in the native Matlab help, help strfind, for the version I'm running, R2015a.
I can't find any mention of this update, however, in the release notes for R2015b or R2016a.
- Could someone verify that this optional syntax works for ver. > 2015a?
- Is it common that minor (expanding/non-breaking) updates to Matlab commands are not included in the release notes? (Or have I've simply missed any mention regarding this one?)
strfindbut not in the documentation. It seems like the online documentation has shifted to R2016a already. - excaza