function pos = findGGT(dna)


% Vector pos stores the locations where string 'GGT' occurs in char vector dna.





pos= [];  % vector of locations where 'GGT' occurs


for k= 1: length(dna)-2


    % Check for 'GGT' in dna(k:k+2)


    % Last location to check for a length 3 substring is length-2


    if (dna(k)=='G' && dna(k+1)=='G' && dna(k+2)=='T')


        pos= [pos k];


    end


end


