Gistlib Logo

gistlib

r=5mm, h=12mm • computes the volume of a cone with radius and height . • assigns the resulting value (in mm3) to a variable named vol. in matlab in matlab

main.m
r = 5; % radius in mm
h = 12; % height in mm

% compute the volume of a cone
vol = (1/3) * pi * r^2 * h; % volume in mm^3
122 chars
6 lines

similar matlab code snippets

how to calculate the volume of a sphere in matlab
how to calculate the area of a ellipse in matlab
how to calculate the secant of an angle in degrees in matlab
how to calculate the volume of a prism in matlab
how to calculate the first derivative of a function in matlab
how to calculate the arccosine of an angle in matlab
find the roots of a polynomial in matlab
how to calculate the arccosine of an angle in degrees in matlab
how to calculate the area of a triangle in matlab
find the slope of a set of points in matlab

related categories

matlab
mathematics

gistlibby LogSnag