Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use Matlab: Matlab Function Name: fruitMarket Inputs 1. 2. (char) List of three fruits you want to buy, capitalized, comma separated (with no spaces)
Please use Matlab:
Matlab
Function Name: fruitMarket Inputs 1. 2. (char) List of three fruits you want to buy, capitalized, comma separated (with no spaces) (char) Character array of capital letters representing fruit market stalls Outputs 1. (char) Minimum cost of buying all your fruit Background Modern day shoppers always struggle to find the cheapest prices in a market. With today's extensive buying options, shoppers like you need an optimal way to find the best deals Function Description Given a comma separated list of fruit that you want to buy, and a character array of the fruit that each stall sells in the market, calculate the minimum cost of buying all of the fruit on your list Each letter in the character array indicates which fruit the stall sells (based on the first letter of the fruit's name). The product (multiplication) of the character's coordinates determines the price of the fruit sold by that stall. The character array below is an example of the fruit sold at a fruit market. BKAO OGPL MTMB Banana is sold at two stalls: the stalls with coordinates [1,1] and [3,4]. Hence, you can buy bananas for $1 or $12 dollars each. You should output your final cost as a string, without any decimals: $
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