%% Count Pattern in Character Vector
% Count the number of times al occurs in the word alphabetical.

chr = 'alphabetical'

%

A = count(chr,'al')

% Copyright 2012 The MathWorks, Inc.