Specimen1 = "AATAAACGCTGGTGGCGTGCTTTATACATGCAAGTCGAGCGGAGATCAGCTTGAA---GCAGAA--GGTGATTAATTTACACTTTGTGTGAGTTATGAACTTTCTGCCACGGTTGATCTTAGCGGCGAACGGGTGAGTAAC-ACGTGGATAATCTGCCCTTGAGACCGGGATAACATCTCGAAAGGGGTGCTAATAC---CGGAAA----------------AATTA------CAGAAAGCAATTTCGGTAACCAAAGTTG------GA-----------TTTTCAAA-------GTTCTTCGC--------------TCAAGGATGAGTCCGCGTCCTATTAGCTA--GTTGGTGAGG-TAAAGGCTCACCAAGGCAATGATGGGTAGCCGGCCTGAG----AGGG--CG--TACGGCCACACTGGGA--CTGAGACACGGC--CCAGACTCCTACGGGAGGCAGCAGTAGGGAATCTTCCGCAATGGGCGAAAGCCTGAC----GGAGCGACGCCACGTGGATG--ATGAAGGCCTTCGGGTCGTAA-AATCCTGTCAGGGGGGACGATGGTCGA-TCTTCGGATT-GATTGACGGTA----------CCCTCA--GAGGAAGCTCC-------GGCCAA--CTACGTGCCAGCAGCCGCGGTAATACGTAGGGAGCAG--------GC----------GTTGT--------------------TCGGATTTACTGGGCGTAAAGAG-TGC--GTAGGC----GGTTATATAAGTCAAAGGTGAAATC-TTC-ACTTTCAAGGTGGAAACTGC-----CTCT-----------------GATAC---------------------------TGTATAACTAG-AGGGCAAGAGG-------------------GGGA-AATGGA-----ACTCTGG----------------------------------------------------------------------GAGTAGCGGTGAAATGCGTAGATATCC------AGAGGAACGCCGGTAGCGAAGGCGATTT-CCTG----GCTTGCATCTGACGCTGAGGCACTAAAGCTAGGGTAGCGATCG----GGATTAGAGACCCCGGTAGTCCTAGCCCTAAACGATGGGTACTAAGTGTGGGGGGAGCATTACCCTCCGTGCTGAAGCTAACGCGTTAAGTACCCCGCCTGGGGAGACGGTCGCAAGACT";
Specimen2 = "----------------------------------------------------GAAACTGC-GAATGGCTCATTAA------------ATCAGTTATG--GTTTAT-------TTGAT--------------GGTACCTTACTACTTGGATA-------------ACCGTAGTAA-TTCTAGA-------GCTAATACATGCGGGAAGTCCCTCTTGGGATGTATTTATTAGATAAGAAACCAATGCGGGCAACC--GGTTGTGTGCTGAGTCATAATAACTTGTCGAATCGCATGGCTTTACGCCGGCGATGGTTCATTCAA--AT--TTCTGC--CCTATCAGCTATCGATGGT-AGGATAGAGGCCTACCATGGCGTTAACGGGTA-----ACGGAGAATTAGGGTTCGATTCCGG----AGAGGGAGCCTGAGAAACGGCTACCACA-TCC-AAGGAAGGCAGCAGGCGCGCAAATTACCCAAT---------CCTGACACAGGGAG---------GTAG-TGACAAGAA------------ATAACAAT----ACAGG------GCTCATCGAGTCTTGTAATTGGAATGA--GTACAATTTAAATCCCTTAACGAGGA----CCAATTGGAGGGCAAGTCT-GGTGCCAGCAGCCGCGGTAATTC--------CAGCTCCAATAGCGTATATTAAAGTTGTTGCAGTTAAAAAGCTCGTAGTCGGATTT-CAGGGCG----GGGCTGCCGGTCTGCCGATGGGTAT-----GCACTGGTGGGCTCGTTCTTCCTTC----TGGGGACTGCGGCTACTCTTGACTGAGCGGTCGTAGGAAACAGGACTTTTACTTTGAAAAAATCAGAGTGTTTAA--AGCAGGCCAAGATGCTCTTGCATGGATTAGCATGGGATAATGGAATAGGACTTTGGTGCTATTTTGTTGGTTTCGAACACCGAAGTAATGATTAATAGGGACAGTCAGGGGCACTCGTATTCCGTTGAG-AGAGGTGAAATTCTTAGA---CCAATGGAAGACGAACTTC---TGCGAAAGC-ATTTGCCAGGGATGTTTTCA-CTGA---TCAAGAACGAAAGTAAGGG----GATCGAAGATGATCAGATACC------GTCGTA------------------------------------------------------------------------------------------------";
InDelFrequency = 0.0000000004;
MutationFrequency = 0.000000004;

global LocalCountMut = 0;
global LocalCountIndel = 0;
global CountFinal = zeros(51,1);
global CurrentlyOnADel = 0;
for i=1:length(Specimen1),
    if (Specimen1(i) ~= '-' && Specimen2(i) ~= '-')
      CurrentlyOnADel = 0;
      if (~strcmp(Specimen1(i),Specimen2(i)))
        LocalCountMut = LocalCountMut + 1;
      endif
    elseif CurrentlyOnADel == 0
        LocalCountIndel = LocalCountIndel + 1;
        CurrentlyOnADel = 1;
    endif
endfor

GenerationsRequiredMut = 0;
GenerationsRequiredIndel = 0;

for i=1:LocalCountMut,
    GenerationsRequiredMut = GenerationsRequiredMut + (1/((MutationFrequency/3)*i));
endfor

for i=1:LocalCountIndel,
    GenerationsRequiredIndel = GenerationsRequiredIndel + (1/((InDelFrequency)*i));
endfor

GenerationsRequiredMut,
GenerationsRequiredIndel,

YearsRequiredMut = GenerationsRequiredMut/365,
YearsRequiredIndel = GenerationsRequiredIndel/365,
