ForICE13A, you are asked to build SINGLE OR MULTIPLE LINES of MATLAB code that accomplishes EACH of the Questions below. You DO NOT need to build a complete MATLAB code for each question below. To check your work, enter the line or lines of code into MATLAB itself. If you don’t get what is asked for, try again! Questions: 1. Assign a random floating-point number between 0 (inclusive) and 1 (exclusive) to the variable A. 2. Assign a random floating-point number between 0 (inclusive) and 5 (exclusive) to the variable B. 3. Assign a random integer between 1 (inclusive) and 5 (inclusive) to the variable C. 4. Assign a random integer between 11 (inclusive) and 50 (inclusive) to the variable D. 5. Assign a different random floating-point number to EACH element in a 3x3 array between 0 (inclusive) and 1 (exclusive) to the variable E. 6. Assign a different random integer to EACH element in a 3x3 array between 0 (inclusive) and 10 (inclusive) to the variable F. [TRICKY QUESTION - HINT: Range is 0-10] 7. Assign a random floating-point number between 0 (inclusive) and 1 (exclusive) to the variable G THEN test ‘G’ to see if it is greater than 0.6. IF G is greater than 0.6 display “G is greater than 0.6” and if G is less than 0.6 display “G is less than 0.6” and if G equals 0.6 display “G equals 0.6”. [HINT: Remember the “disp” command??] 8. There are a few simple questions in Blackboard to answer. Be careful on the wording!
ForICE13A, you are asked to build SINGLE OR MULTIPLE LINES of MATLAB code that accomplishes EACH of the Questions below. You DO NOT need to build a complete MATLAB code for each question below. To check your work, enter the line or lines of code into MATLAB itself. If you don’t get what is asked for, try again!
Questions:
1. Assign a random floating-point number between 0 (inclusive) and 1 (exclusive) to the variable A.
2. Assign a random floating-point number between 0 (inclusive) and 5 (exclusive) to the variable B.
3. Assign a random integer between 1 (inclusive) and 5 (inclusive) to the variable C.
4. Assign a random integer between 11 (inclusive) and 50 (inclusive) to the variable D.
5. Assign a different random floating-point number to EACH element in a 3x3 array between 0 (inclusive) and 1 (exclusive) to the variable E.
6. Assign a different random integer to EACH element in a 3x3 array between 0 (inclusive) and 10 (inclusive) to the variable F. [TRICKY QUESTION - HINT: Range is 0-10]
7. Assign a random floating-point number between 0 (inclusive) and 1 (exclusive) to the variable G THEN test ‘G’ to see if it is greater than 0.6. IF G is greater than 0.6 display “G is greater than 0.6” and if G is less than 0.6 display “G is less than 0.6” and if G equals 0.6 display “G equals 0.6”. [HINT: Remember the “disp” command??]
8. There are a few simple questions in Blackboard to answer. Be careful on the wording!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images