# A supermarket conveyor belt holds an array of groceries The price o

Content type
User Generated
Rating
Showing Page:
1/2
A supermarket conveyor belt holds an array of groceries.
The price of each product (in Euros) is [ 0.6 1.2 0.5 1.3 ] ;
while the numbers of each product are [ 3 2 1 5 ]. Use
MATLAB to calculate the total bill. 4. A supermarket
conveyor belt holds an array of groceries. The price of
each product (in Euros) is [ 0.6 1.2 0.5 1.31 ; while the
numbers of each product are [ 3 2 1 5
Solution
% inorder to get the total bill we have to multiply the cost
of each product with the number of products
%matrix multiplivation rule: number of columns in first
matrix is equal to number of rows in second matrix
% price is 1 by 4 matrix
% numberofproducts is 4 by 1 matrix.
% therefore totalcost is 1 by 1 matrix
% program is saved as sp.m
price=[0.6 1.2 0.5 1.3]
numberofproducts=[3; 2; 1; 5]
totalcost= price*numberofproducts
output:
sp
price =

Showing Page:
2/2

Unformatted Attachment Preview
A supermarket conveyor belt holds an array of groceries. The price of each product (in Euros) is [ 0.6 1.2 0.5 1.3 ] ; while the numbers of each product are [ 3 2 1 5 ]. Use MATLAB to calculate the total bill. 4. A supermarket conveyor belt holds an array of groceries. The price of each product (in Euros) is [ 0.6 1.2 0.5 1.31 ; while the numbers of each product are [ 3 2 1 5 Solution % inorder to get the total bill we have to multiply the cost of each product with the number of products %matrix multiplivation rule: number of columns in first matrix is equal to number of rows in second matri ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

### Review

Anonymous
This is great! Exactly what I wanted.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4