It turns out that since you''ve become experts

Assignment Help MATLAB Programming
Reference no: EM13165996

It turns out that since you've become experts on rating clothing, Acme Clothing Company has hired you to rate their 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 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 structure array called acmeClothes that contains clothes structures. You are to write a script called rateClothes that will add a Rating field and a Quality field to each of the structures in the 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 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.

HERE IS THE MAKECLOTHES FUNCTION YOU NEED TO USE:

function res = makeClothes
% Function to create clothes structure
    for fld = 1:5
        for item = 1:8
            ca{item} = floor(rand(1,1) * 6);
        end
        data(fld,:) = ca;
    end
    res = struct('Condition', data(1,:), ...
                 'Color', data(2,:), ...
                 'Price', data(3,:), ...
                 'Matches', data(4,:), ...
                 'Comfort', data(5,:));           
end

Reference no: EM13165996

Questions Cloud

Create a pda with 2 stacks : Create a PDA with 2 stacks. The first stack is preloaded with data (example below), the data input consists of 1 & 0 as well. Your PDA should process the input data, adding the binary string to the values in the first stack and storing the result in ..
The comparedto method : the comparedTo method. This is the course class I do not understand how to do the compared to method. I need to order the course first by department then by the course number.
Describe how you would access these 4 members : Create a namespace titled global Type that contains four members. The members should be two named constants, n and rate. It should also contain a variable count and the function printResult. Describe how you would access these 4 members in a progr..
State what is the normality of sulfuric acid solution : What is the normality of sulfuric acid solution which contains 6.64 g of H2SO4 in 837 mL of solution provided that the reaction involved
It turns out that since you''ve become experts : It turns out that since you've become experts on rating clothing, Acme Clothing Company has hired you to rate their clothes. Clothes are now represented as structures instead of vectors with the fields (all of which are numbers between 0 and 5): C..
Write out a cfg : Write out a CFG for the following regular expression a n b m  | m > n > 0
State what is the percent for a solution consisting : What is the percent H2SO4 for a solution consisting of 4.62 equivalencies of H2SO4 mixed with 11.2 kg of water if both portions
Draw appropriate lewis structure and vsepr structure : Draw appropriate Lewis structure and VSEPR structure for oxalate anion. What is the O-C-O bond angle? What is the C-C-O bond angle? What is the hybridization of each carbon? On which atoms does the negative charge reside? Draw all resonance struct..
What is the total mass of insulin in the bottle : Insulin is a protein that is used by the body to regulate both carbohydrate and fat metabolism. A bottle contains 375 of insulin at a concentration of 50.0 . What is the total mass of insulin in the bottle?

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Read the file a line at a time

Write the modified text file with the same name as the original file, but preprended with 'new_'. For instance, if the input filename was 'data.txt', the output filename would be 'new_data.txt'.

  Write a user-defined matlab function

Write a user-defined MATLAB function that calculate the condition number of an (nxn) matrix by using the 1-norm. for the function name and arguments use c = condNum_one(A).

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

  Function that will use the secant method to try to find

Create a function that will use the Secant method to try to find a root. (Hint modify the posted version of False Position.) Because this method may diverge

  Secant method to tryt to find out the root

create a function that will use the secant method to tryt to find out the root

  Write matlab scripts

Write MATLAB scripts for to accept two numbers from the user; Display all prime numbers between these two numbers.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  A good way to structure this program

A good way to structure this program is to read in each "number" as a string of characters, look at the first character to determine what kind of number it is (hex, binary, decimal), and then call an appropriate function to convert the string into..

  Coding(using for and while loop)

coding(using for and while loop)

  Write a function named ''read_line''

Verify that your code works by saving some text into a file (created in notepad / textedit) and saving the file with extension '.txt'. You should attach the file (call it 'test.txt') with your code.

  Mat lab programming problem

In case the problem in the code I want you to modify it give the correct temperature.

  Matlab program to compute how much money will accumulate

Write a MATLAB program to compute how much money will accumulate in 5 years in the account and in any CDs you buy. Run the program for two different savings interest rates: 4 percent and 5 percent.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd