回复: 程序出错 求救
不知下程序可否:
k=input('please input a random number from 1 to 10:');
l=input('please input a random number from 1 to 10:');
tic
x=rand(400,1024);
y=zeros(80,1024);
for n=1:40
b=randperm(10);
a(2*n-1)=(n-1)*10+b(k);
a(2*n)=(n-1)*10+b(l);
y(2*n-1,: )=x(a(2*n-1),: );
y(2*n,: )=x(a(2*n),: );
end
x(a,: )=[];
x,y
toc
不行的话说一声!!不行的话说一声!!
|