Demo entry 6751453

cost profit model

   

Submitted by anonymous on Jun 23, 2018 at 11:55
Language: Matlab. Code size: 397 Bytes.

%%cost
t=0:1:12;
x=50+40.*t;
% average cost
y=(11000+2000.*t)./x+20;
% price
z=100;
plot(x,y)
hold on
XL = xlim();
plot(XL, [z z], 'g--')
hold off; 
xlabel('number of Luvs produced');
ylabel('average cost');
title('cost per Luv vs number of Luv produced')


%%profit
p=(z-y).*x;
%plot(t,p);xlabel('time passed/month');ylabel('total profit/euros');title('total profit vs time')

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).