ps4solnsW06

ps4solnsW06 - %Engineering 6, Winter 2006, Problem 4.1...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
%Engineering 6, Winter 2006, Problem 4.1 Solution %(Worker analysis and results) %Suppress extra lines in output and clear variables %and command window format compact ; clear; clc; %Define vectors for the hourly wage, hours worked, and % output data. (Note: We could have created % an array for the whole table, but it's easier % to do it like this.) wage = [5.00 5.50 6.50 6.00 6.25]; hours = [39 43 37 51 45]; output = [1050 900 1000 1250 1100]; %(a) Calculate and display worker earnings for the week. %(We'll use two lines; it could be displayed all on one.) earnings = wage.*hours; fprintf( 'Earnings for each worker ($): \n' ); fprintf( '%8.2f' ,earnings); %(b) Calculate total payroll for the week. payroll = sum(earnings); fprintf( '\n\nTotal payroll: $%.2f\n\n' ,payroll); %(c) Calculate total items made. items = sum(output); fprintf( 'Total items made: %.0f\n\n' ,items); %(d) Average cost to produce one item. aveCost = payroll/items; fprintf( 'Ave. cost to make one item: $%.3f\n\n' ,aveCost); %(e) Average time to produce one item. aveTime = sum(hours)/items; fprintf( 'Ave. time needed to make one item: %.3f hours\n\n' ,aveTime); %(f) Efficiency of workers. efficiency = output./hours; fprintf( 'Efficiency of each worker in items per hour:\n' ); fprintf( '%8.1f' ,efficiency); fprintf( '\n' ); Displayed results: Earnings for each worker ($): 195.00 236.50 240.50 306.00 281.25 Total payroll: $1259.25
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Ave. cost to make one item: $0.238 Ave. time needed to make one item: 0.041 hours Efficiency of each worker in items per hour: 26.9 20.9 27.0 24.5 24.4
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/02/2009 for the course EEC eng 6 taught by Professor Lagerstrom during the Winter '06 term at UC Davis.

Page1 / 6

ps4solnsW06 - %Engineering 6, Winter 2006, Problem 4.1...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online