Error " Index exceeds Matrix dimensions"
- by Mola
Hi experts,
I am trying to read an excel 2003 file which consist of 62 columns and 2000 rows and then draw 2d dendrogram from 2000 pattern of 2 categories of a data as my plot in matlab. When i run the script, it gives me the above error. I don't know why. Anybody has any idea why i have the above error?
My data is here:
http://rapidshare.com/files/383549074/data.xls
Please delete the 2001 column if you want to use the data for testing.
and my code is here:
% Script file: cluster_2d_data.m
d=2000; n1=22; n2=40; N=62
Data=xlsread('data.xls','A1:BJ2000');
X=Data';
R=1:2000;
C=1:2;
clustergram(X,'Pdist','euclidean','Linkage','complete','Dimension',2,...
'ROWLABELS',R,'COLUMNLABELS',C,'Dendrogram',{'color',5})