Question

Homework 02 - Vectors, Strings, and Masking Function Name: badWeatherman Inputs: 1. (logical) Vector of suspect #1s answers

Thank you for your help!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1 function outputstring-fruitThief(T1, T2,T3,T4) 2 %To check whehter the #1 is thief or not 4 r11-(T1(:,1)T2(:,1)) && (T20:,145 47 50 %Determine the thief using m 51 52 Km will have 1 ith place, where #1 is the thief 53 54 %Example: if m is [0 1 0 0]81 Thief-fruitThief([1 1 1 1],01 1 0 1],01 1 0 1],01 1 0 11) 82 83 %Call fruitThief fucntion 84 85 Thief-fruitThief(C1 1 0 1]

Output

Sample output: 8Call fruitThief fucntion Thief-fruitThief (1 1 0 1], [0 0 0 1],1 1 0 1], [1 1 0 1]) %Call fruitThief fucntion

Add a comment
Know the answer?
Add Answer to:
Thank you for your help! Homework 02 - Vectors, Strings, and Masking Function Name: badWeatherman Inputs: 1. (logical)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Homework 02-Vectors, Strings, and Masking Function Name: forecast Inputs 1. (char) A character vector of the current fo...

    Homework 02-Vectors, Strings, and Masking Function Name: forecast Inputs 1. (char) A character vector of the current forecast 2. (char) The word to be replaced 3. (char) The new word to put into the forecast Outputs 1. (char) The updated forecast description Banned Functions strrep), replace), regexprep() Background You have recently started your internship as a weather engineer at the local news station. Unhappy with how the curment forecasts are described as 'gloomy" and 'cold, you decide to use MATLAB...

  • MATLAB code help!! Homework 3 - Arrays, Masking, Systems of Equations, Plotting, and Numerical Methods Function Name: s...

    MATLAB code help!! Homework 3 - Arrays, Masking, Systems of Equations, Plotting, and Numerical Methods Function Name: sysEq Inputs: 1. (double) An NxN array representing an A matrix 2. (double) An Nx1 vector representing a b matrix Outputs: 1. (double) An Nx1 vector representing the resulting x matrix Background: Whoo, who woulda thunk it? Actually useful things in MATLAB? You bet! This method of solving systems of linear equations is useful in a wide variety of places, from solving mesh...

  • MATLAB code help! Function Name: jackSparrow Inputs: 1. (double) A 1x2 vector describing your hand 2....

    MATLAB code help! Function Name: jackSparrow Inputs: 1. (double) A 1x2 vector describing your hand 2. (double) A 1x2 vector describing Jack Sparrow's hand 3. (double) A vector with the next cards to be drawn from the deck Outputs: 1. (char) A description of the game outcome Background: You're out at sea with the infamous Jack Sparrow, and it's a pretty calm day. Without anything better to do, Jack Sparrow challenges you to his favorite card game: BlackJack (Sparrow edition)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT