ps9solnsF06

ps9solnsF06 - %Engineering 6, Fall 2006, Problem 9.1...

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

View Full Document Right Arrow Icon
%Engineering 6, Fall 2006, Problem 9.1 Solution %(Product costs calculation) %Suppress extra lines in output and set fixed short display format compact ; format short ; clc; clear; %Clear command window and variables %Define a 5x3 matrix of the product costs (in 1000s of dollars, % with the first column being materials costs for products 1 % through 5, the second column being labor costs, and the third % column being transportation costs). A = [7 3 2; 3 1 4; 9 6 5; 2 5 3; 8 2 1]; %Define a 5x4 matrix of the quarterly production volume (in 1000s % of units, with each column representing one of the quarters). B = [16 14 10 12; 12 15 10 13; 8 9 7 11; 14 13 18 15; 16 12 12 9]; %Part (a) %The quarterly costs for materials, labor and transportation % may be calculated by taking the transpose of A and multiplying % it by B, i.e., A' is a 3x5 matrix with the first row holding % the materials costs data for each product, the second holding % the labor costs, and the third the transportation costs. % The first row of the 3x4 matrix C = A'B will hold the quarter 1 % to 4 costs for materials, the second the quarter 1 to 4 costs % for labor of each product, and the third the quarter 1 to 4 % costs for transportation. C = A'*B; disp( 'Quarter 1 through 4 costs for materials (in millions of $):' ); disp(C(1,:)); disp( 'Quarter 1 through 4 costs for labor:' ); disp(C(2,:)); disp( 'Quarter 1 through 4 costs for transportation:' ); disp(C(3,:)); disp( ' ' ); %Part (b) %The total material costs will be the sum of the values in row
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/22/2011 for the course ENG 006 taught by Professor Lagerstrom during the Fall '06 term at UC Davis.

Page1 / 5

ps9solnsF06 - %Engineering 6, Fall 2006, Problem 9.1...

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

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