Matlab
The test suite generates a random number and assigns it to the variable RandomNumber. Write a script that checks if the value assigned to RandomNumber is between 0 and 10 (consider values of exactly 0 and exactly 10 to be in range). If the value is in this range, assign the string \"The number is in range.\" to the variable CheckRange. If the value is not in this range, assign the string \"The number is out of range.\" to the variable CheckRange.
// generate random number lets say e.g between 1 to 100
RandomNumber= round(rand(1)*100)
if ( RandomNumber >=0 && RandomNumber<=10)
disp(\'Number is in the Range\')
else
disp(\'number is not in the range\')
end
2) second
RandomNumber= round(rand(1)*100)