if true [Y,I] = sort(debug_true_angle, 'ascend'); debug_true_angle = debug_true_angle(I); debug_est_angle = debug_est_angle(I); error_translation = error_translation(I); error_angle = error_angle(I); end figure ; subplot(3,1,1); plot(error_translation,'.') %xlabel('experiment number'); set(gca,'xtick',[]) grid on title(sprintf('%s - Error in translation estimate (m)',name)) subplot(3,1,2); plot(error_angle,'.') %xlabel('experiment number'); grid on set(gca,'xtick',[]) title(sprintf('%s - Error in rotation estimate (degrees)', name)) subplot(3,1,3); hold on; set(gca,'YGrid','on'); xlabel('experiment number'); plot(debug_true_angle, 'k.'); plot(debug_est_angle, 'r+'); set(gca,'ytick',0:30:180) legend('true','estimated','Location','NorthWest'); title(sprintf('%s - Ground truth versus estimated rotation', name)) print('-depsc',sprintf('exp_%s_plots.eps', prefix)); good_angles_find = find(error_angle < 5); good_angles = error_angle(good_angles_find); figure; hist(good_angles, 100) fprintf('Average good angle error: %f\n', mean(good_angles)); figure cdfplot(good_angles) title('cdf of good angles')