仅供参考
A=[45 2 3;45 3 3;45 4 8;
47 2 1;47 3 6;47 4 9;
51 2 8;51 3 6;51 4 7];
index=unique(A(:,1));
for i=1:length(index)
mid = find(A(:,1)==index(i));
B = A(mid,:);
eval(['m',num2str(index(i)),'=','B']);
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!