about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/KPMtools/myrand.m
blob: 836b854b6f25403254369d98820bc99f80aee217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function T = myrand(sizes)
% MYRAND Like the built-in rand, except myrand(k) produces a k*1 vector instead of a k*k matrix,
% T = myrand(sizes)

if length(sizes)==0
  warning('myrand[]');
  T = rand(1,1);
elseif length(sizes)==1
  T = rand(sizes, 1);
else
  T = rand(sizes);
end