% % Written by: % -- % John L. Weatherwax 2005-08-14 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- load galaxy % The 'hist' function can return the bin centers and frequencies. % Use the default number of bins - 10. % nBins = 10; [n, x] = hist(EastWest,nBins); % Plot and use the argument of width = 1 to get bars that touch. figure; bar(x,sqrt(n),1,'w'); title('Rootogram - Galaxy Data') xlabel('Velocity') ylabel('sqrt(Frequency)') saveas( gcf, '../../WriteUp/Graphics/Chapter9/prob_9_19', 'epsc' );