> 其他 >
用MATLAB生成一个100*100的矩阵,其中随机产生100个-1,其余数全部为零.
人气:314 ℃ 时间:2020-05-20 16:43:34
解答
a = [-ones(100,1);zeros(9900,1)];
a = reshape(a(randperm(10000)),100,100);
推荐
猜你喜欢
© 2026 79432.Com All Rights Reserved.
电脑版|手机版