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

  Create a matlab program

Create a MATLAB program that will use MATLAB's fzero function to determine d for the following parameters: R = 0.5 m and in steps of 0.1. Create a table consisting of S and d .

  The function take optional arguments, theta, alpha, beta

the function tverskySim (found in problem4/tverskySim.m) takes optional arguments, theta, alpha, beta where theta is the weight assigned to the common features between a and b, alpha is the weight for the distinctive features of a, and beta is the we..

  Plot the lines using the inputted vector of x values and x

Write a function named solveSystem that has three inputs: two vectors consisting of coefficients [a b c] of two line equations of the form ax + by = c and a vector of x values.

  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.

  Determine the specular component

Reparemeterizing each pixel point using spherical coordinates and rotation RGB color space to SUV color space in the paper

  Create an animation of a square

create an animation of a square according to the directions below. Create a square with a side length of 3 with the square centered at (5,5). Translate this square along a cosine wave on the interval [0, 6*pi].

  Computes the stiffness matrix for one bilinear element with

write Matlab code that computes the stiffness matrix for one bilinear element with 4 nodes

  Create functions in file

Create Functions in File and how to code this function - Declare function inputs, and outputs

  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.

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

  Write a matlab function newtonraphson

Write a MATLAB function newtonRaphson(fx, x0, sigfig, maxIT) that will return a root of the function f(x) near x=x0 using the Newton-Raphson method, where sigfig is the accuracy of the solution in terms of significant figures

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