EXAMPLE Matlab Help

Volume of a Circular Cylinder

The volume of a circular cylinder of height h and radius r is given by V = π r² h, particular cylindrical tank is 15 m tall and has a radius of 8 m. We want to cons another cylindrical tank with a volume 20 percent greater but having the same height. How large must its radius be?

Solution

First solve the cylinder equation for the radius r. This gives
Capture

The session is shown below. First we assign values to the variables rand h representing the radius and height. Then we compute the volume of the original cylinder, and increase the volume by 20 percent. Finally we solve for the required radius. For this problem we can use the MATLAB built-in constant pi.

Capture

Thus the new cylinder must have a radius of 8.7636 m. Note that the original values 0 the variables r and V are replaced with. the new values. This is acceptable as long as we do not wish to use the original values again. Note how precedence applies to the line V pi *r”2*h;. It is equivalent to V pi * (r”2) *h;.

Posted on July 30, 2015 in An Overview of MATLAB

Share the Story

Back to Top
Share This