|||
% The uniformly distributed random numbers are in the interval (0,1).
X1 = rand; % retun a singal ramdom number.
X2 = rand(6); % return a 6-by-6 matrix of random numbers.
X3 = rand(3,4); % return a 3-by-4 matrix of random numbers.
X4 = -5 + (5+5)*rand(10,1); % generate a 10-by-1 column vector in (-5,5).
sz = size(X4); % return the size of the vector X4.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2025-1-11 02:45
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社