Question: matlab, no conditionals please Function Name: setThief I. 2. 3. 4. (logica) Vector of suspect #1's answers to a lie detector (logical) Vector of suspect

matlab, no conditionals please Function Name: setThief I. 2. 3. 4. (logica)matlab, no conditionals please

Function Name: setThief I. 2. 3. 4. (logica) Vector of suspect #1's answers to a lie detector (logical) Vector of suspect #2's answers to a lie detector (logical) Vector of suspect #3's answers to a lie detector (logical) Vector of suspect #4's answers to a lie detector Outputs 1. (char) Sentence stating which suspect stole the set list Banned Functions isequal (), isequaln(), strcmp(), strcmpi() Background: You are the manager for the headliner at a music festival, and there's been an incident: someone stole and leaked the set list. The band is not happy, and it's up to you to bring justice to the thief. You have identified four suspects, and given them a lie detector test. You know that each suspect who is telling the truth will have matching answers. However, the thief will having at least one answer that is different from the rest. You have decided to use your new MATLAB skills to find the true thief Function Description Each input to the function is a logical vector corresponding to the answers a suspect gives on the lie detector. Each element of the vectors represent a different question. Three of the suspects will have the exact same answers, but one suspect's answers will be slightly-or completely-different than the others' answers. Using your knowledge of logical indexing and masking, determine which of the four suspects is lying, and thus, is the set list thief The output string will be of the form 'Suspect # corresponds to the suspect number who stole the set list. The number is determined by the input order Notes: . The suspect who lied (the one who leaked the set list), will have at least one answer that is different from the other suspects' answers, but could differ up to every answer You may not use the isequal() function to code this problem. Use of the isequal() function will result in zero credit for this problem. However, the use of isequal() to check that your output matches the solution outputs is encouraged The output string ends with a period. Do not forget that period! . . Function Name: setThief I. 2. 3. 4. (logica) Vector of suspect #1's answers to a lie detector (logical) Vector of suspect #2's answers to a lie detector (logical) Vector of suspect #3's answers to a lie detector (logical) Vector of suspect #4's answers to a lie detector Outputs 1. (char) Sentence stating which suspect stole the set list Banned Functions isequal (), isequaln(), strcmp(), strcmpi() Background: You are the manager for the headliner at a music festival, and there's been an incident: someone stole and leaked the set list. The band is not happy, and it's up to you to bring justice to the thief. You have identified four suspects, and given them a lie detector test. You know that each suspect who is telling the truth will have matching answers. However, the thief will having at least one answer that is different from the rest. You have decided to use your new MATLAB skills to find the true thief Function Description Each input to the function is a logical vector corresponding to the answers a suspect gives on the lie detector. Each element of the vectors represent a different question. Three of the suspects will have the exact same answers, but one suspect's answers will be slightly-or completely-different than the others' answers. Using your knowledge of logical indexing and masking, determine which of the four suspects is lying, and thus, is the set list thief The output string will be of the form 'Suspect # corresponds to the suspect number who stole the set list. The number is determined by the input order Notes: . The suspect who lied (the one who leaked the set list), will have at least one answer that is different from the other suspects' answers, but could differ up to every answer You may not use the isequal() function to code this problem. Use of the isequal() function will result in zero credit for this problem. However, the use of isequal() to check that your output matches the solution outputs is encouraged The output string ends with a period. Do not forget that period

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!