SHOWCLUSTERS is a debugging function to check the clustering results. SHOWCLUSTERS is a debugging function to check the clustering results. USAGE: showclusters(angleVector,rangeMatrix,clstrs); INPUTS: angleVector: 1xN vector; angleVector lists the angles for the ranges in rangeMatrix. rangeMatrix: MxN array; Each row in rangeMatrix contains a laser scan with ranges at the angles specified in angleVector. clstrs: MxN array. clstrs should be the same size as rangeMatrix. Each element in clstrs is an integer indicating the line cluster the range to which reading belongs.
0001 function showclusters(angleVector,rangeMatrix,clstrs) 0002 % SHOWCLUSTERS is a debugging function to check the clustering results. 0003 % 0004 % SHOWCLUSTERS is a debugging function to check the clustering results. 0005 % 0006 % USAGE: 0007 % showclusters(angleVector,rangeMatrix,clstrs); 0008 % 0009 % INPUTS: 0010 % angleVector: 1xN vector; angleVector lists the angles for the ranges 0011 % in rangeMatrix. 0012 % 0013 % rangeMatrix: MxN array; Each row in rangeMatrix contains a laser scan 0014 % with ranges at the angles specified in angleVector. 0015 % 0016 % clstrs: MxN array. clstrs should be the same size as rangeMatrix. 0017 % Each element in clstrs is an integer indicating the line cluster the 0018 % range to which reading belongs. 0019 0020 0021 0022 for cntr=1:size(rangeMatrix,1) 0023 dispclstrscore(angleVector,rangeMatrix(cntr,:),clstrs(cntr,:)); 0024 title(num2str(cntr)); 0025 pause; 0026 close; 0027 end