你好,建议是
D = load('Data.mat'); fields = fieldnames(D); D = getfield(D,fields{1}); predata = D(randperm(size(D,1),1000),:);
Data的size是多少?