% Difference between match and exact match echo on; funs = char('ceil', 'floor', 'fix', 'round', 'ceiling', 'celestial'); str1 = 'ceil'; disp('using strmatch: ') strmatch(str1, funs) disp('using strmatch with exact: ') strmatch(str1, funs, 'exact') disp('next, using strncmpi: ') k = 2; strncmpi(str1, funs, k) pause; current_fun = deblank(funs(1,:)); strncmpi(str1, current_fun, k) echo off;