Will compute the value of each piece of clothing.

Assignment Help MATLAB Programming
Reference no: EM13168545

 have a friend who has too many clothes to store in her/his tiny wardrobe provided by Georgia Tech. Being a good friend, you offer to help to decide whether each piece of clothing is worth saving. You decide to write a script in MATLAB that will compute the value of each piece of clothing. A piece of clothing has five attributes that can used to determine its value. The attributes are: condition, color, price, number of matches, and comfort. Each attribute will be rated on a scale of 1-5. Write a script called clothes in MATLAB that will ask the user for the ratings for each attribute and store the result in a vector. The order of attributes in the vector are as follows:

[condition color price matches comfort]

The script should compute a value between 0 and 100; 100 represents

a good piece of clothing while 0 represents a bad piece of clothing.

The points that should be given for each attribute are shown below:

Condition: 1=>0; 2=>5; 3=>10; 4=>15; 5=>20

Color: 1 => blue => 12;

2 => red (UGA Colors) => 2;

3 => pink => 15;

4 => yellow (GT Colors) => 20;

5 => white => 12

Price: 1 => 8, 2-3 => 16, 4-5 => 20 Matches: 1-2 => 8, 3-5 => 19 Comfort: 1 => 6, 2-3 => 13, 4-5 =>18 Note: If a number other than 1-5 is assigned for one of the attributes, no points should be given.

*Use the Switch statement for 'Condition', 'Color' and 'Price'. If a number other than 1-5 is entered, assign a rating of 0.

Reference no: EM13168545

Questions Cloud

Ample research evidence : There is ample research evidence to suggest that odors can have a profound effect on
Create a class named blooddata that includes fields : Create a class named BloodData that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and -). Create a default constructor that sets the fields to "O" and "+", and an overloaded c..
Recursive method : What will happen when the following recursive method is executed with an initial input value of 10?public int recursiveMethod(int input)
Calculate the concentration of sodium ions : Calculate the concentration (M) of sodium ions in a solution made by diluting 50.0 mL of a 0.874 M solution of sodium sulfide to a total volume of 250.0 mL
Will compute the value of each piece of clothing. : write a script in MATLAB that will compute the value of each piece of clothing.
Write a c program using the fork() system : Write a C program using the fork() system call that generates this sequence in the child process. The starting number will be provided from the command line. For example, if 8 is passed as a parameter on the command line, the child process will ou..
Work out from the molar mass : An antacid tablet contains 0.1 g of magnesium hydrogencarbonate, Mg(HCO3)2. What mass of stomach acid, HCl, will it neutralise? The reaction between Mg(HCO3)2 and HCl is: Mg(HCO3)2 + 2HCl → MgCl2 + 2CO2 + H2O
What mass of carbon monoxide in grams is present : What mass of carbon monoxide in grams is present in a room measuring 8.5 12.0 18.4 ft ?
Data validation refers to checking the content : Data validation refers to checking the content of data to ensure that it satisfies certain rules, known as constraints. For example, the employee name should never be omitted in the employee table, and the delivery date should be after (greater th..

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Write a matlab function that takes a matrix

Write a MATLAB function that takes a matrix, a row number and a column number. Beginning with the row number passed to the function, scan down the column passed to the function and return the row number that contains the largest absolute value in ..

  Matlab: create a function that will use the secant method

MATLAB: Create a function that will use the Secant method

  Biologically inspired method

Biological ly Inspired Methods + Ma tlab Assignmen t,  Define a problem of your choice which can be tackled by Biologically Inspired Methods. The problem must satisfy the following requirements

  Obtain the cross products using matlab cross function

Use MATLAB cross function to obtain the above cross products. Note that the accelerations are known functions of the derivatives of the three coordinates.

  Write a simple program that stores the high temperatures

A meteorological company wants you to write a simple program that stores the high temperatures and low temperates for each of the months of the year. After consulting with trusted programming partners, you come up with a great idea

  Let''s combine everything together

Let's combine everything together! In this question, you will be asked to combine scaling and translations. Write a function named "problem5" that accepts a single input and scales the image by 0.5 and shifts it up by 7 units. The input variable h..

  Value for the side of the octagonal prism

Value for the side of the octagonal prism, and a scalar value for the height of the octagonal prism. Generate the x,y,z arrays that define the 9 faces of the pyramid (octagonal base and 8 triangles. Use fill3 command to create the faces (faces wit..

  Find general solution of the ordinary differential equation

Find a general solution of the following ordinary differential equations and find the general solution of the following ordinary differential equation

  write a function under the name "write2"

a)Write a function under the name "write2" so that it will save the diagonal component of the given matrix...

  Design and synthesis of continuous time controllers

Design and synthesis of continuous time controllers - A graphical user interface (GUI) is a human-computer interface that uses menus, dialogue box, and button which can be manipulated by a mouse

  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).

  Consider the predator-prey models

Consider the predator-prey models developed early part of the 20 th  century in which the number of predators and preys may be predicted using the pair of ODEs

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