MATLAB: Adding random numbers together

random numbers

So I'm using this code
% Create a vector of 53 random #s and analyze them.
r = rand([53,1])
% The sum of all the random numbers
sum=sum(([53,1]))
disp(result)
But it doesn't seem to be working.
I'm new to ML
How do I find the sum (and product) of the random numbers?

Best Answer

sum(r)
prod(r)
Related Question