function [est, res] = view_evolution(log, nchunks) n = size(log.T,2); order = randperm(n); fprintf('view_evolution: Computing %d chunks: ', nchunks); res={}; for i=1:nchunks fprintf(' %d ', i); upto = round(n * i / nchunks); indexes = order(1:upto); log_chunk = trunc_log(log, indexes); res_chunk = full_calibration(log_chunk); res{i} = res_chunk; est(:,i) = res{i}.est_params; end fprintf(' done.\n'); from = 1; %round(nchunks / 5); perc = round( (from:nchunks) * n / nchunks); figure nw=7; k=1; subplot(nw,1,k); k=k+1; plot(perc,est(1,from:nchunks)*1000); title('distance between wheels (mm)'); xlabel('sample set size'); subplot(nw,1,k); k=k+1; title('wheels radiuses (mm)'); hold on; plot(perc,est(2,from:nchunks)*1000,'b-'); plot(perc,est(3,from:nchunks)*1000,'r-'); hold off; subplot(nw,1,k); k=k+1; plot(perc,est(3,from:nchunks) ./ est(2,from:nchunks)); title('radiuses ratio'); subplot(nw,1,k); k=k+1; plot(perc,est(4,from:nchunks)*1000); title('laser x (mm)'); subplot(nw,1,k); k=k+1; plot(perc,est(5,from:nchunks)*1000); title('laser y (mm)'); subplot(nw,1,k); k=k+1; plot(perc,rad2deg(est(6,from:nchunks))); title('laser theta (deg)'); error_measure = join(collect(res, 'error_measure')); subplot(nw,1,k); k=k+1; plot(perc,error_measure(from:nchunks)); title('error measure'); function c = trunc_log(log, indexes) c.T = log.T(indexes); c.phi_r = log.phi_r(indexes); c.phi_l = log.phi_l(indexes); c.sm = log.sm(:,indexes);