www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/CountPatternInCharacterVectorExample.m

    %% Count Pattern in Character Vector
% Count the number of times |al| occurs in the word |alphabetical|.
chr = 'alphabetical'

%%
A = count(chr,'al')