Question
Using MATLAB 1) You are the owner of three small grocery stores in your city. You want to know how much money you made last
Using MATLAB
1) You are the owner of three small grocery stores in your city.
You want to know how much money you made last week selling pre-packaged gift boxes of fruit (a box contains just apples, oranges, pears, or plums).
You purchase the fruit boxes wholesale from your distributor (apples $3.20/box, oranges $3.65/box, pears $4.00/box, plums $3.50/box).
Your selling price includes a 30% markup and is rounded to the nearest dime.
Note: Markup % = (selling price cost) / cost 100 For example, if the wholesale price of a single box of apples from the distributor is $3.20, you would mark it up by 30% to $4.16. The final selling price is rounded to $4.20.
If you sold one box, then your gross profit from the sale is $4.20 $3.20 = $1.00. Write a MATLAB script that meets these specifications: Create a 41 column vector that holds the wholesale prices (given above) for each type of fruit box.
For each of the three stores, prompt the user to enter the number of boxes sold for each type of fruit. The user should enter the box quantities as a vector, like this: [#apples #oranges #pears #plums]
Create a 34 matrix from the three vectors of box sales data. Each row in the matrix corresponds to a particular store. Calculate the gross profit earned at each store. Hint: Matrix-vector math (using *, +, or operators and the sum function) can quickly solve the equations. Calculate the total profit of all the stores combined.
Display a table showing the number of fruit boxes sold at each store.
Display the total profit.
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