Question: Question(s) must be answered in MATLAB. Thank you! Slot Machine (Subfunctions and Branching) Part 5 The double diamond slot machine game has three windows. Each
Question(s) must be answered in MATLAB. Thank you!



Slot Machine (Subfunctions and Branching) Part 5 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 isThreeABs to detect from symbols of three windows (w1,w2, w3), if in all three windows there are either single bar, double bar or triple bar Function name: IsThreeABs ; Inputs : w1,w2, w3 (type: string); Output: logical 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: >> w1='C'; W2='BB ';w3-'7'; out=ISThreeABs (w1, W2, w3 ) out a logical 0 >> W1='B'; W2: 'BB '; w3='BBB '; out=ISThreeABs (W1, W2, w3) out = logical
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
