Professional Documents
Culture Documents
Rohan 5
Rohan 5
USN : 23BTRDC058
MATLAB ASSIGNMENT 5
1) A body originally at 140 cools down to 80 in 20 minutes. If the temperature of the air is 30 . Find
the temperature of the body after 35 minutes.
T_initial = 140;
T_final = 80;
T_ambient = 30; time_elapsed = 20; k = -1 / time_elapsed * log((T_final -
2) The number of species in a culture is growing at a rate of 2000 per unit of time t . At t = 0, the number of
bacteria present was 5,200. Find the number present at t = 7.
clear
all clc
syms
x(t)
ode = diff(x,t)==2000*exp(2*t/5);
cond=x(0)==5200;
xsol(t)=dsolve(ode,cond);
n = 7;
population_Size=subs(xsol(t),t,n)
population_Size =
t = 0: n;
X = xsol(t); plot(t,X,'--
b') xlabel('Time');
ylabel('Time');
ylabel('Bacteria Population Size');
grid on
1
3) Solve the following LPP:
Minimize Z = 3
Subject to 8
12
where,
f = [-3; -4];
A = [1 2
3 2];
b=[8;,12;]; lb =
zeros(2, 1);
options = optimset('Display', 'iter');
[x, favl] = linprog(f, A, b, [], [], lb, [], options);