Note: need to create a MathLab for this problem. Compute the volume of a cylindr
ID: 2082105 • Letter: N
Question
Note: need to create a MathLab for this problem.
Compute the volume of a cylindrical shell with an inner radius r1=5, an outer radius r2=6, and length=10.
Use loops as required to cover the volume. Compute dv, x, y, and z for each pass through the inner loop. Compute the volume by initializing it to zero before starting the loops, and accumulate the value of dv inside of the inner loop. Save the values of x, y, z. for each pass and plot as blue dots.
Compute the volume of the cylindrical shell using algebra, and compare to the numerical value you computed.
Call your program VolumeOfCylindricalShel.m
Explanation / Answer
clc;
close all;
clear all;
% Consider in an X-Y plane, The cylindrical shell would look
% a concentric circles. The area within them will be pi*rout^2 - pi*rin^2
%Now as we move up in z -axis, it gains volume and it is given by
%Area*height
%This is how we will approach.
h = 0:1:10; %height of shell
r2 = 6; r1 = 5;
A = pi*((r2^2)-(r1^2));
dV = 0;
for i = 2:1:length(h);
dV = dV + (A*(h(i)-h(i-1)));
end
V = dV
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.