Cluster merging - mergeclust.m

Syntax:
results2=mergeclust(results,q,index)

 results Structure Results of the PPCA based segmentation
 q Scalar integer Number of principal components
 index Scalar integer Index of the mergeable cluster
 
 results2 Structure Modified results of the segmentation

This function merges the compatible indexth and index+1th clusters and gives the modified values of the segmentation in the variable results2, which has the same structure as the output variable of the segmentation algorithm ppcamod.m.