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

  Least squares

For homework consider the points (0,0), (1,2), (2,3), (3,9), ( 4,17), (5,24), (6,37). (1) Use Matlab to find the least squares best fit with a line.  Turn in A, y and c and a plot like the one above.  Also (2) use Matlab to find the least square best..

  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.

  Plot way forms for the subsequent modulation schemes

Plot way forms for the subsequent modulation schemes using Matlab

  Calculate the distance between cities

Calculate the distance between cities

  Matlab program which will determine your vehicle fuel usage

Create a MATLAB program which will determine your vehicle fuel usage (MPG, miles/gallon) rating for a user defined number of trips ('for' repetition structure). Review the voiceover supplied for an example of the required input/output from this progr..

  Finds the largest integer in the list recursively

Write a program that, given a list of 20 integers, finds the largest integer in the list recursively

  Write a function that takes a list of integers as argument

Write a function that takes a list of integers as argument and returns a pair consisting of the sum of the even positions and the sum of the odd positions of the list. You should not use any auxiliary functions.

  An efficient human identification using gait analysis

An Efficient Human Identification Using Gait Analysis, Apply specific approach for Pattern Recognition,Implement this approach in MATLAB,Compare and discuss the results with others.

  Calculate an approximation to the energy consumed

Calculate an approximation to the energy consumed over the period and calculate an approximation to the energy consumed over the period t = a to t = b.

  Develop a simulation program

Develop a simulation program

  Receives one number as an input argument

Write a function per2 that receives one number as an input argument. The function has a persistent variable that sums the values passed to it. Here are the first two time the function is called

  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.

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