very simplistic version of plotbyfactor. no symbols, will crash if more than 8 levels.
0001 function plotbyfactor(x,y,f) 0002 % 0003 % very simplistic version of plotbyfactor. 0004 % no symbols, will crash if more than 8 levels. 0005 % 0006 0007 z = unique(f); 0008 cols = ['b','r','g','m','c','y','k','w']; 0009 0010 for (i = 1:length(z)) 0011 u = find(f==z(i)); 0012 plot(x(u),y(u),'.','color',cols(i)); 0013 hold on; 0014 end; 0015 hold off; 0016 0017 return;