%Script to generate design runs for paper helicopter lab %USER MODIFICATIONS ARE NEEDED IN LINES 13 AND 17 clear %x1 = rotor length %x2 = leg width %x3 = leg length %%%%% INPUT FACTOR BOUNDS %%%%% %This should take the form: bounds = [l1 u1 ; l2 u2 ; l3 u3] for %lower/upper bounds on factors 1, 2, 3. bounds = [ ] ; %%%%% SELECT MODEL DESIGN %%%%% %Choose a response surface design. (bbdesign or ccdesign would be good...) run_codes = ; %Next, convert these codes to real values run_values = zeros(size(run_codes)); %initialize for ii = 1:3 zmax = max(run_codes(:,ii)); zmin = min(run_codes(:,ii)); run_values(:,ii) = interp1([zmin zmax],bounds(ii,:),run_codes(:,ii)); end %We should reorder these for testing run_order = randperm(length(run_codes)); %Make MATLAB display the runs. disp({'Run Number','Rotor Length','Leg Width','Leg Length'}) disp(sortrows([run_order' run_values])) % % How can you model the results? % How can you find the optimal point? %