Question: Using Matlab, What is wrong with the error in test one. RandomNumber is already a value in the script. Follow directions carefully. The test suite
Using Matlab, What is wrong with the error in test one. RandomNumber is already a value in the script. Follow directions carefully. 
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.
#CHAR
| Your Script C Reset MATLAB Documentation 1 %Enter the cnnnands far your script here. Nate the variah1 Randarunter 15 defined in the test sulte workspace. Do nnt averwrite 1 ts value in your script. Ee sure to assign a value to the variable CheckRange. 2 CheckRange = [Randon unter] CheckRange = ['The number 1s in range') s else 6 CheckRange- ("The nunter is out of Range"J 7 end Previous Assessment: Incorrect Run Prelest SuEmit Test 1 Pretest Th" variable should be a character array Df lerigth 23 far this test Test Code: first test answer in range' 2 RandoNunter = 2 + 5rana 11,1); reference. solution dy_correcti - CheckRange 5 clear CheckRange 6 run(' solution' ; test if variable exists and are naned correctly s assert isequalfexist CheckRange var,1), I'The variable, CheckRange, has not been created. .. Check spelling and capitalization.'1) 10 student_soll CheckRange; 1 12 ,,Check datatype and size therkRange, shauld he a as sert(isa(student-sal!,.char'),('The variable, assert(isequa 1( size (student-so11),size test accuracy character array i.e. text string' y_correct1)),sprintf(['The variable should "be a character array of Length d for this test.',lengthiy_correctl)1) assertliscqualstudent_soll,y correcti), 'CheckRange is incorrect. Check for typos 'in the character array and that you have inplomented the conditional correctly1) Output: 3.2529 CheckRange The number ia in range
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
