E7_Su2010_Solutions6_all

E7_Su2010_Solutions6 - Contents Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Problem 7 Problem 8 Problem 9 Problem 10 Problem 11

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

View Full Document Right Arrow Icon
Contents Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Problem 7 Problem 8 Problem 9 Problem 10 Problem 11 Problem 12 Problem 13 Problem 14 Problem 15 % E7 Summer 2010 Assignment 6 Solutions % Lecturer George Anwar % created 7/2010, Kenny Lee (reader) Problem 1 Q = [0:0.01:8]*1e6; % Sets independent variable array revenue = ((6e6-Q)/1.1e6).*Q; % 'P' is revenue PER UNIT 'Q' cost = 2.045e6+(0.62+0.24+0.16)*Q; % Cost including 'fixed','material','energy','labor' figure % Opens a new figure plot(Q*1e-6,revenue*1e-6, ... % Plot quantity (in units of millions) vs. revenue/cost (in units of mill Q*1e-6,cost*1e-6); grid on % Displays gridlines title({ 'E7 Assignment 6 Problem 1' ; ... % '. ..' syntax allows you to start a new line. MATLAB ignores this, just 'Revenue and Cost of Chemical Product' }); % Titles the plot with two lines xlabel( 'Q (millions of gallons)' ); % Labels x-axis ylabel( 'Revenue / Cost (millions of dollars)' ); % Labels y-axishold on; legend( 'Revenue' , 'Cost' ); % Legend gtext( 'Breakeven Point 1' ), ... gtext( 'Breakeven Point 2' ); % Labels with user selection. TEXT() can be used as well. % Breakeven points are approximately at Q=0.5 and Q=4.4 million gallons. % Any value of Q between these values will be profitable. Producing less % than 0.5 million gallons will be unprofitable because of the fixed costs. % Producing more than 4.4 million gallons will be unprofitable because the % selling price will drop too much. % Profit is calculated as the difference between revenue and cost. figure plot(Q,revenue-cost); grid on title({ 'E7 Assignment 6 Problem 1' ; ... 'Profit of Selling Chemical Product' }); xlabel( 'Q (millions of gallons)' ); ylabel( 'Profit (millions of dollars)' ); % Maximum profit occurs approximately with 2.4 million gallons of product.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Problem 2 Guess and check to home in on the roots. Example of axes is shown below: figure fplot( 'x*tan(x)-9' ,[0 50]); grid on % Plots the equation with x-axis range defined by [] syntax title({ 'E7 Assignment 6 Problem 2' ; ... 'Zoomed Out View of the First 16 Roots of y=x*tan(x)-9' }); xlabel( 'Independent Variable x' ); ylabel( 'Dependent Variable y' ); figure fplot( 'x*tan(x)-9' ,[1.15 1.5]); grid on title({ 'E7 Assignment 6 Problem 2' ; ... 'Zoomed In View of the 1st Root of y=x*tan(x)-9' }); xlabel( 'Independent Variable x' ); ylabel( 'Dependent Variable y' ); figure fplot( 'x*tan(x)-9' ,[4 4.5]); grid on title({ 'E7 Assignment 6 Problem 2' ; ... 'Zoomed In View of the 2nd Root of y=x*tan(x)-9' }); xlabel( 'Independent Variable x' ); ylabel( 'Dependent Variable y' ); figure fplot( 'x*tan(x)-9' ,[6.9 7.4]); grid on title({ 'E7 Assignment 6 Problem 2' ; ... 'Zoomed In View of the 3rd Root of y=x*tan(x)-9' }); xlabel( 'Independent Variable x' ); ylabel( 'Dependent Variable y' ); % The first plot shows 16 roots for 0<=x<=50, so there probably are an % infinite number of positive roots. The first three roots were found with % the above session: x=1.41,4.27,7.18.
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 08/14/2010 for the course E 7 taught by Professor Patzek during the Summer '08 term at University of California, Berkeley.

Page1 / 15

E7_Su2010_Solutions6 - Contents Problem 1 Problem 2 Problem 3 Problem 4 Problem 5 Problem 6 Problem 7 Problem 8 Problem 9 Problem 10 Problem 11

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