Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 3 (6 Points) MATLAB Build a code that performs the following, and draw its flow diagram as well: Creates a 10x10 random matrix Checks
Problem 3 (6 Points) MATLAB Build a code that performs the following, and draw its flow diagram as well: Creates a 10x10 random matrix Checks for the values in the 10x10 random matrix that fall in the ranges 0 to 1/3, 1/3 to 2/3, and 2/3 to 3. When this is done, find the locations (row vs. column) of these values in the random matrix Using the locations for each range of values, plot the rows vs. columns and assign it a marker color. When you do this for each range of values, you will end up with some holiday lights with three different colors. Remarks Notice that when you wrote the logical statement to check if the value of the random matrix fell inside certain range, you wrote "and" as &. With this being said, and the remark from the last problem, we have concluded that in if-statements you must write &&; however, in logic statements & is the right entry. This applies to | and as well (or). Notice that you can decrease the length of your code by writing: yellow_row, yellow_col] = find (rand mat >=0 & rand mat =0 & rand mat
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started