Question
Please write in Matlab. Thank You! Today you are going to pretend to be a detective working for an agency by interviewing suspects for a
Please write in Matlab. Thank You!
Today you are going to pretend to be a detective working for an agency by interviewing suspects for a house robbery. The agency has obtained records of4 variables from 20 suspects and a number has been assigned to each suspect. This data is stored in a 20 by 5 matrix. You can download this matrix on blackboard and extract it form the file Problem5.mat. The format of the matrix is as follows:
Column 1: number assigned to the suspect Column 2: height of each suspect (cm) Column 3: weight of each suspect (kg) Column 4: systolic blood pressure of each suspect (mmHg)
Column 5: heart rate of each suspect (beats/min)
-
The agency has a fuzzy street cam video of an intruder escaping from the house. From the video, it was deduced that the thief is roughly 150 to 180 cm tall, and weighs between 60 to 80 kg. Create a new matrix called suspects which includes the suspects who meet the above characteristics. Store each suspects number, weight and height in the matrix suspects. Also create a vector called notasuspect containing ONLY the suspect number of those who do not meet the mentioned characteristics. (Hint: you can use for and if statements)
-
Traces of a drug were found at the incident site, suggesting that the thief may have high blood pressure. Edit the matrix suspects by deleting the all the information of the suspects whose blood pressure is lower than 120 mmHg. Add these deleted suspects to the notasuspect vector.
-
The heart rates of the suspects were monitored and recorded for a key question in the interview process. Those with accelerated heart rate were considered dishonest. Edit matrix suspects by deleting the subjects with heart rate lower than 140 beats/min.
There should only be two suspects left. Display the result in the following format:
The most likely to be the thief are suspect N and M. ...where N and M are the assigned numbers of the two remaining suspects
-
1 169 93 115 140 2 196 81 126 77 3 100 97 134 72 4 151 73 108 86 5 182 63 102 74 6 161 72 117 61 7 172 64 105 96 8 129 93 109 189 9 192 61 145 96 10 172 85 118 77 11 154 82 111 84 12 114 93 138 81 13 137 68 105 84 14 168 95 137 70 15 144 74 123 72 16 143 90 130 61 17 162 72 107 72 18 151 96 135 69 19 165 73 132 144 20 160 66 122 172
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