From: YASMIN M. Yacob on 21 Jul 2010 08:57 I have already set the path to the prtools toolbox and followed guidance from the newsgroup i.e John D'Errico group list. In the reply message posted, John suggested to put the current working directory at the top of MATLAB search path. My plan is to use together the dataset frm statistics tool and getsize frm prtools together in an .m file, but cannot do it. I actually want to count how many instance/records in a particular class and detect what are the classes. Anybody has any idea how to solve tis problem? Thank you. % Read from xls and put in dataset ds = dataset('xlsfile', 'iris.xls'); [nobs,nvars] = size(ds); %% % Sort based on 1st column for i = 1 : nvars-1 sample = ds(1:nobs,[i nvars]); answer = sortrows(sample); disp(answer); % plan to put tis coding [m,k,c] = getsize(answer); % from prtools getlablist(answer); %from prtools % currently cannot do this % m = 6; while (m < nobs) tf=strcmpi(answer{m,2},answer{m+1,2}); disp(answer{m,2}); disp(answer{m+1,2}); if (tf == 1) span=0; else disp(m); span=5; end m = m + span + 1; end end
|
Pages: 1 Prev: Separation of time serie in trend Next: Find coresponding values in two matrices |