From: Walter Roberson on 22 May 2010 11:09 Gumah wrote: > On May 21, 1:37 pm, Walter Roberson <rober...(a)hushmail.com> wrote: >> Gumah wrote: >>> T3=[D1 D2 D3 D4 D5 D6 ]; >>> C=min(T); >>> switch (C) >>> case (D1) >>> fprintf( '. A\n' ); >>> case (D2) >>> fprintf( '. B\n' ); >>> case (D3) >>> fprintf( '. C \n' ); >>> case (D4) >>> fprintf( '. D \n' ); >>> End >> If you are trying to count the number of times actually printed, you >> will either need to make the function a nested function, or you will >> need to use a 'global' variable. > I am trying to change the code so that it keeps track of the number of > times each > one has been printed, and then access those counts at the end.. Well, re-read my hint, re-quoted above. |