Created
August 29, 2015 10:43
-
-
Save mick001/705c57758c553c5e2422 to your computer and use it in GitHub Desktop.
Volume of solids of revolution: the cone. Part 1. Full article at: http://www.firsttimeprogrammer.blogspot.com/2015/03/volume-of-solids-of-revolution-cone.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Solid of revolution % | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
syms x | |
syms y | |
% Cone height | |
h = 10; | |
% Our generator function | |
y1 = @(x) 1/2*x; | |
% Our generator function raised to the 2nd power | |
y2 = @(x) (1/2*x)^2; | |
% Volume of the cone (radius is implicitly 5) | |
v = pi * int(y2,x,0,h) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment