Sei sulla pagina 1di 1

% -- Program to show the variation of lat. surf.

area with diameter -- %


% -- Inputs are length (l), diameter (is a vector of values) (d) -- %
% -- The problem is solved for a unit length of given cross section -- %
% -- of the material
D = 1;
l = 4/pi;
A = pi*(D^2)/4;
TotVol1 = A*l ;
d = 0.01:0.01:1;
n = size(d,2);
a = pi*d.^2/4;
for i=1:n
num(i) = A/a(i);
x(i) = d(i);
SurfArea(i) = num(i)*pi*d(i)*l;
TotVol2(i) = num(i)*pi*((d(i)^2)/4)*l;
end
plot(x,SurfArea)
title('Variation of lateral surface area with diameter')
xlabel('Diameter of cross section (d) in units')
ylabel('Total Effective Lateral Surface Area in sq.units')

Published with MATLAB R2015a

Potrebbero piacerti anche