Creating array with while loop results

edited September 2007 in Science & Tech
How do you store the results of a while loop as an array, so I can do a min, max, and median.

thank you,
ld

Comments

  • shwaipshwaip bluffin' with my muffin Icrontian
    edited September 2007
    you'll want to use a variable to keep track of the index:
    ind=1;
    while (whatever)
         %code
         answers(ind) = whatever you want;
         ind = ind + 1;
    
    end
    
Sign In or Register to comment.