%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Solution to CS&E Your Homework Assignment Project 10 % Multidimensional Integration: Partition and Conquer % % Generate 500 pseudorandom pairs and 500 quasirandom % points in 6 dimensions. % Plot the pseudorandom points. % For the quasirandom points, make % a plot of the first two coordinates, % a separate plot of the third and fourth coordinates, % and a final plot of the fifth and sixth coordinates. % problem3.m Dianne P. O'Leary 09/2004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% N = 500; z1 = rand(N,2); z2 = quasirand(1,N,6); subplot(2,2,1) plot(z1(:,1),z1(:,2),'*') title('Pseudorandom samples') subplot(2,2,2) plot(z2(:,1),z2(:,2),'*') title('First two quasirandom coordinates') subplot(2,2,3) plot(z2(:,3),z2(:,4),'*') title('Second two quasirandom coordinates') subplot(2,2,4) plot(z2(:,5),z2(:,6),'*') title('Third two quasirandom coordinates') print -depsc quasirand.eps