Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribedDisplay the total profit.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions