Reference no: EM13165990
It turns out that since you've become experts on ratingclothing, Acme Clothing Company has hired you to rate theirclothes. Clothes are now represented as structures insteadof vectors with the fields (all of which are numbers between 0and 5):Condition, Color, Price, Matches, and ComfortAcme has a much simpler way of rating their clothes than you used before:Rating
?
5 * Condition
?
3 * Color
?
2 * Price
?
Matches
?
9 * Comfort
You have a script called makeClothes.m that will create a structurearray called acmeClothes that contains clothes structures. You are towrite a script called rateClothes that will add a Rating field and a Quality field to each of the structures in the acmeClothes array. TheRating field in each structure should contain the rating of thatparticular article of clothing.
The Quality field is a string that is 'premium' if the Rating is over 80,
'good' over 60,
'poor' over 20,
and 'liquidated' for anything else.
Notes:
1. You MUST use iteration to solve this problem.
2. To make things easy, just place the line makeClothes at the top of your script so you're guaranteed to have the correct acmeClothes array to work with.
3. The fields are case sensitive, so make sure you capitalize them