Replace substring% replace file ending ".txt" with ".csv"
mydata.csv
mydata
% alternatively, use: "erase"
mydata % using startswith and endswith to check presence of substring
Check / find substringcheck for substring ~isempty(strfind("Friday","day")) 1 % True: substring "day" appears in string "Friday" get position of substring strfind("Friday","day") 4 % substring "day" appears at character position 4 in string "Friday" # separate words using the delimiter '_'
ID = strsplit('subjectA_sample02','_') {'subjectA'} {'sample02'}
s1 = ID{1}
s2 = ID{2} |