AllCodons - for l=1:4%4 possible letters in 3rd position build up matrix row-by-row myNewList =[myNewList rnaVector(j rnaVector(k rnaVector(l end

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function m = allCodons f % m is the 64-by-3 matrix of characters representing all the RNA codons % m = char(zeros(64,3)); %initialize m as a character matrix m rnaVector= ['U' 'C' 'A' 'G']; %RNA alphabet vector r % iterate through for each possible permutation for i=1:3 myNewList = []; for j=1:4 %4 possible letters in 1st position for k=1:4 %4 possible letters in 2nd position
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: for l=1:4 %4 possible letters in 3rd position % build up matrix row-by-row myNewList = [myNewList; rnaVector(j), rnaVector(k), rnaVector(l)]; end end end end m = myNewList; m % myNewList stored in m, output of function allCodons, which now houses a % character matrix of each of the possible RNA codons (64 in total. .) %...
View Full Document

This note was uploaded on 09/12/2009 for the course CS 100 taught by Professor Fan/vanloan during the Fall '07 term at Cornell University (Engineering School).

Ask a homework question - tutors are online