Friday, September 20, 2013

Substringing in matlab

Many functions in matlab let you do various things to strings

strtok(s,delim)
returns the substring before delim

[first,rem]=strtok(s,delim)
first the substring before delim
rem the substring s-first(it includes delim)

strrep(s,'a','b')
replaces a with b in s

No comments: