replacement for findstr
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
findstr('text', guidata.dataFile{1,1}.header{i})
header{i} is a 1x4 char (in this example named text)
I have a loop that dynamically generates radio button position and color based on a header row. What I have now works fine but because findstr seems to be on the chopping block I am trying to update the code. I have tried strncmp and regexp but can't seem to figure it out.
Any help is appreciated.
0 Kommentare
Antworten (1)
Jan
am 25 Aug. 2011
Do your mean STRFIND?
9 Kommentare
Jan
am 25 Aug. 2011
FINDSTR had the risky feature that the shorter string is searched in the longer one. If you want to look for the position of 'one' inside 'stone', the reply of FINDSTR will be surprising, if the 2nd string is 'e'.
MATLAB 2009a still ontained several dangerous FINDSTR calls. Perhaps they are replaced by STRFIND now, which searches the 2nd string inside the first one.
Jan
am 25 Aug. 2011
FINDSTR had the risky feature that the shorter string is searched in the longer one. If you want to look for the position of 'one' inside 'stone', the reply of FINDSTR will be surprising, if the 2nd string is 'e'.
MATLAB 2009a still ontained several dangerous FINDSTR calls. Perhaps they are replaced by STRFIND now, which searches the 2nd string inside the first one.
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!