Each week a builder makes an order of doors from a supplier. The doors normally cost $60
Fantastic news! We've Found the answer you've been seeking!
Question:
Each week a builder makes an order of doors from a supplier. The doors normally cost $60 each, but the supplier gives a 10% discount for any order of 30 or more doors. The orders for the first 8 weeks of the year are given in the vector:
Orders = [20 40 15 30 25 45 10 35]
(a) Write a MATLAB program using a for loop and if statement to find the total cost of the doors ordered.
(b) Extend your program using the find command to find which weeks the builder obtained a discount.
Related Book For
Probability and Statistics for Engineers and Scientists
ISBN: 978-0495107576
3rd edition
Authors: Anthony Hayter
Posted Date: