Question: I don't know how to do this problem for matlab. There are multiple subparts. I tried to do part 3, however, my code does not

I don't know how to do this problem for matlab. There are multiple subparts. I tried to do part 3, however, my code does not work properly. Please be aware that there are restrictions as to what can and can't be used in each part. If you could please help me with all the parts that would be great. This is for matlab programing only. Thank you!

I don't know how to do this problem for matlab. There aremultiple subparts. I tried to do part 3, however, my code doesnot work properly. Please be aware that there are restrictions as towhat can and can't be used in each part. If you couldplease help me with all the parts that would be great. Thisis for matlab programing only. Thank you! This tool is provided bya third party. Your activity is always recorded, but you may needto refresh the page to fill in the banner LAB L23.19.1: SlotMachine (Branching) Part 3 Count the cherries ACTIVITY 0/5 Slot Machine Part3 The double diamond slot machine game has three windows. Each windowshows either a double diamond (DD), a cherry ('C'), a single bar(B'), double bar (BB') or triple bar (BBB), or the number seven(7) or a blank (o). Write a function NumberofCherries to detect fromsymbols of three windows (w1,w2,w3), the number of cherries: subfunction name NumberofCherries

This tool is provided by a third party. Your activity is always recorded, but you may need to refresh the page to fill in the banner LAB L23.19.1: Slot Machine (Branching) Part 3 Count the cherries ACTIVITY 0/5 Slot Machine Part 3 The double diamond slot machine game has three windows. Each window shows either a double diamond (DD), a cherry ('C'), a single bar (B'), double bar (BB') or triple bar (BBB), or the number seven (7) or a blank (o). Write a function NumberofCherries to detect from symbols of three windows (w1,w2,w3), the number of cherries: subfunction name NumberofCherries Inputs: w1,w2,w3 (type: string): Output: number of double diamonds (type: integer) The number of cherries result regardless of what other syymbols appears with them. The double diamond is wild and can represent any of the other signs to maximize the number of cherries Hint: In writing branching code, instead of using the symbols, use the corresponding numbers. Restriction: The function must use the custom function AssignNumber, similar to what was specified in Slotmachine Part 1. Your function can simply call the function AssignNumber For example: umberofcherries('C','C','BB') >> out out = out-NumberofCherries('7", 'C',C out = out-NumberofCherries( 'DD, 'C,'7 out =

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!