% Example 8.3
% Use same leukemia data set 
% and matrix Z from Example 8.1.
% The second argument is the
% number of clusters. The
% third argument is a string
% specifying what information
% the second argument provides.
rectplot(Z,15,'nclus')

% We now show how to use the optional
% class labels, using the cancer type.
% The argument must be numeric, so we
% convert strings to numbers.
% First set all indices to 0 - this will
% be class ALL.
labs = zeros(length(cancertype),1);
% Now find all of the AML cancers.
% Set them equal to 1.
inds = strmatch('AML',cancertype);
labs(inds) = 1;
% Now do the rectangle plot.
rectplot(Z,15,'nclus',labs)
