clc clear all disp('ABSTRACT') disp(' Example showing the use of vectors') % Example using vectors to store random numbers % Purpose: This program finds random numbers % Date: 12/02/2009 disp(' ') disp('INPUTS') % INPUTS xlow=1; % low number xhigh=53; % highest number m=6; % amount of numbers needed fprintf(' %g Random numbers from %g to %g\n\n',m,xlow,xhigh) % CODE/OUTPUTS disp('OUTPUTS') i=1; for i=1:1:m lucky_six(i)=floor(xlow+rand*(xhigh-xlow+1)); end disp(' The "Lucky Six" numbers are:') disp(lucky_six)