I need to write a function for the area of a circle. If area = pi * r.^2. How can I ensure that a randomly generated value for r will be positive?… r = rand was rejected by my teacher. I assume because r could be negative?
MATLAB: Generate positive random numbers
MATLABrandom number generator
Best Answer