• 0

# engr 133 _lab 03_yabbasi.pdf 2021.pdf

Is there anything else you׳d like to ask?

Related Documents
1 / 6100%
1
ENGR 133, Lab-03
Authored By: Yazan Abbasi
Authored on: 9/25/21
Exercise #1... Problem 5.1
Problem Statement
We are asked to construct a breakeven plot for producing and selling a chemical product. We are given vlaues
for fixed cost (FC), variable cost (VC), quantity (Q), and unit selling price (P). We want to know the breakever
point, the range of profitable production, and the quantity of product that produces maximum profit.
Pseudocode
Initialize variables
Preform calculations
Evaluate results
Display results
Problem Solution
Initialize variables
Preform calculations
Evaluate results
Display results
clc,clear,close all
FC = 3e6; % fixed cost in dollars per year
VC = 0.025; % variable cost in dollars per gallon produced
P = 0.055; % selling price in dollars per gallon sold
Q = [0:200]*1e+6; % quantity produced/sold in millions of gallons per year
TC = FC + Q*VC; % returns total cost (TC) per year in \$M
TR = Q*P; % returns total revenue (TR) per year in \$M
TP = TR - TC; % returns profit per year in \$M
idx = find(TP>0); % finding all positive indexes where TP is positive
minQ_idx = min(idx); % findinf first index where TP is positive
BEP = Q(minQ_idx); % return breakeven point in m illions of gallons per year
plot(Q*1e-6, TC, Q*1e-6, TR, '--')
title('production Economic Model')
xlabel('Quantity Produced/Sold, millions of gallons')
ylabel('Total revenue/cost, \$M')
legend('Total Cost', 'Total Revenue', 'location', 'northwest')
grid on
2
The breakeven point occurs at 101 million gallons.
Operations are profitable above this point.
there is no upper limit on profitability.
Exercise #2... Subplots
Problem Statement
We are asked to construct a 2 by 2 grid of plots showing sin(x), cos(x), e^x, and both sin(x) and cos(x) on the
same subplot. We must include elementsto to create proper plots.
Pseudocode
Initialize variables
Display results
Problem Solution
Initialize variables
fprintf('Operations are profitable above this point. \n\n')
fprintf('The breakeven point occurs at %3.0f million gallons. \n\n', BEP*1e-6)
fprintf('there is no upper limit on profitability. \n\n')
clc,clear,close all