clc
clear
disp('Zhoria Renfus')
#anonymous functions
V_sphere= @(r) (4/3*pi*r.^3) #element by element. (add dot when usind powers)
V_cylinder= @(r,h) (pi*r.^2*h)
r=1:0.5:10
h=2
VS= V_sphere(r)
VC= V_cylinder(r,h)
plot(r,VS,r,VC)
To embed this project on your website, copy the following code and paste it into your website's HTML: