Hi every one..
I am going to make a function which takes three input arguments limit,a,b in that order. The function returns an a-by-b matrix of uniformly distributed random integers between 1 and limit inclusive. I am not allowed to use randi, but i can use rand. To make sure that my result is indeed uniformly distributed, test the output of the function by using the built-in function hist, which plots a histogram.
to make such function i am using that codes
function rad=rad1(limit,n,m)mat=zeros(n,m);for i=1:n for j=1:m a=rand(1,limit); mat(i,j)=floor(a) endendend
but i getting error every time.Can anybody assist me to make such function…Thanks in advance
Best Answer