www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/SquareMatrixofRandomIntegersExample.m
%% Square Matrix of Random Integers %% % Generate a 5-by-5 matrix of random integers between 1 and 10. The first % input to |randi| indicates the largest integer in the sampling interval % (the smallest integer in the interval is 1). r = randi(10,5)