All pastes #784707 Raw Edit

Something

public text v1 · immutable
·published 2007-11-19 20:24 UTC
rendered paste body
for i=1:M,                   % loop over number of groups
    switch i
        case i <= 7
            plotstyle=[m(1) c(i)];
        case i <= 14
            plotstyle=[m(2) c(i-7)];
        case i <= 21
            plotstyle=[m(3) c(i-14)];
        case i <= 28
            plotstyle=[m(4) c(i-21)];
        case i <= 35
            plotstyle=[m(5) c(i-28)];
        case i <= 42
            plotstyle=[m(6) c(i-35)];
        case i <= 49
            plotstyle=[m(7) c(i-42)];
        case i <= 56
            plotstyle=[m(8) c(i-49)];
        case i <= 63
            plotstyle=[m(9) c(i-56)];
    end
    indexvec=find(groupvec==i);    % find all indices belonging to group i
    plot(data(1,indexvec),data(2,indexvec),plotstyle,'MarkerSize',5,'MarkerFaceColor',plotstyle(2))
    plot(centers(1,i),centers(2,i),plotstyle(1),'MarkerSize',7,'MarkerEdgeColor','r','MarkerFaceColor',plotstyle(2))
end;