Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In matlab please. tain viruses. Unless you need to edit, it's safer to stay in Protected View. QL Please help a grocery store to calculate

image text in transcribed

In matlab please.

tain viruses. Unless you need to edit, it's safer to stay in Protected View. QL Please help a grocery store to calculate their sales amount Let vector "Price" contains the products unite price, vector "count" contains the sales volume of each product (how many pieces each product was sold) vector "cost" contains the unit cost of each product. For example, price = [1.99, 2.89, 11.89, 15.49, ...) count=[15, 29, 17, 35,-) cost=[0.99, 1.5, 8, 10,...) That is, product 1 was sold 15 pieces, and the unit price is $1.99, unit cost is $0.99. product 2 was sold 29 pieces, and the unit price is $2.89, unit cost is $1.5. product 3 was sold 17 pieces, and the unit price is $11.89, unit cost is $8. product 4 was sold 35 pieces, and the unit price is $15.49, unit cost is $10. Assume the length of all three vectors are same but unknown. 1. Code to calculate the unit profit of each product i.e. unit price-unit cost), save to vector "profit". 2. Code to calculate the total profit for all products based on the sale volumes. That is, (1.99-0.99)* 15+ (2.89-1.5)*29+ (11.89-8)*17 + (15.49-10)*35+.... 3. During a holiday promotion, the store offers 10% discount for each product Code to calculate the unit profit after discount for all products, and save to new vector "profitDisct". 4. With the price discount, it found that the sale volume for each product increased by 15\%. Code to calculate the sale volume after discount for all products, and save to vector "countDisct". 5. Following 3, 4, code to calculate the total profit of all products during the promotion. Q2. There are multiple classes at grade 7, each class has the same number of students. Their math scores are saved in a matrix A. The dimension of A is unknown 1 Code to find the average score, maximum score and minimum score of each class. 2. Code to find the average score, maximum score and minimum score of grade 7. 3. Code to update the last score of 2nd class (2nd row) to 74. 4. Code to add one new column to the last column which is the total score of each class. 5. Code to add one new row to the last row which is the row sum of the matrix

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_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

Do they appear to be stressed out?

Answered: 1 week ago