Question
It turns out that since you become an expert on rating clothing, Acme Clothing Company has hired you to rate its clothes. Clothes are now
It turns out that since you become an expert on rating clothing, Acme Clothing Company has hired you to rate its clothes. Clothes are now represented as structures instead of vectors with the fields (all of which are numbers between 0 and 5).
Condition, Color, Price, Matches, and Comfort
Acme has a much simpler way of rating its clothes than you used before:
Rating=5*Conditions+3*Color+2*Price+Matches+9*Comfort
Create the structure below and call it makeClothes. You will use this to automatically rate them with a script. (HINT: Use struct() function and all values in a cell array to ensure structure array matches the picture below.)
You are to write a script that will add a Rating field and a Quality field to each of the structures in the new acmeClothes array. The Rating field in each structure should contain the rating of that particular 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 everything else.
Your output structure array should look like this:
Note:
You MUST use a loop to solve this problem.
To make things easy, just place the makeClothes at the top of your script, so youre guaranteed to have the correct acmeClothes array to work with.
The fields are case sensitive, so make sure that you capitalize them.
Ed ltem Shirt 1 Shirt 2" Shirt 3' Pant 1 Pant 2 Pant 3 Shoe 1 Glove 1 Hat 1 Socks Fields conditionColor Ed Price Matches H C 4 4 4 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started