# HG changeset patch # User DaveM # Date 1487240626 0 # Node ID c674bf769d823ae1e37606763a0920a04f67cebd # Parent 4a8ec6c461a070fd50db0ae0315191e1aa35c904 fix infinite loop bug in tree feature identification diff -r 4a8ec6c461a0 -r c674bf769d82 phase2/treeLinkFeatures.m --- a/phase2/treeLinkFeatures.m Thu Feb 16 10:07:42 2017 +0000 +++ b/phase2/treeLinkFeatures.m Thu Feb 16 10:23:46 2017 +0000 @@ -15,21 +15,22 @@ listSize = size(data,1); % linkList(:,4) = 0; -featureList = cell(listSize-1,1); +featureList = cell(listSize-1,2); currentRow = [2*listSize-1]; %% while (~isempty(currentRow)) if(currentRow(1) > listSize) - row = currentRow(1) - listSize + row = currentRow(1) - listSize; +% rD = linkList(row,4); if(linkList(row,4) < depthThresh) classList = traceLinkageToBinary(linkList, row); - featureList{row} = rfFeatureSelection(data(classList>0,:), classList(classList>0)); - currentRow = [currentRow(2:end); linkList(row,1); linkList(row,2)]; + featureList{row,1} = rfFeatureSelection(data(classList>0,:), classList(classList>0)); + featureList{row,2} = linkList(row,4); end - else - currentRow = currentRow(2:end); + currentRow = [currentRow; linkList(row,1); linkList(row,2)]; end + currentRow = currentRow(2:end); end end \ No newline at end of file