Code covered by the BSD License  

Highlights from
Classical_Mechanics_with_Matlab_applications_JEH.zip

from Classical_Mechanics_with_Matlab_applications_JEH.zip by Javier Hasbun
Applications from the text: Classical Mechanics with Matlab applications by Javier E Hasbun, Jones &

moment_sdisk.m
%moment_sdisk.m
clear;
f=inline('x.^2.*(1-x.^2).^(0.5)*4/pi'); %define the integrand
J=quad(f,0.0,1.0,1.e-5);                %Simpson quadrature integration 
fprintf('The integral is %4.3f',J);     %print the result to three decimals

Contact us at files@mathworks.com