% Script to calculate the volume and area of a sphere of diameter D.
%% Define Diameter D
D = 1;

%% Calculate radius
r = D - 2    % radius of the sphere.

%% Calculate volume of sphere
sphVol = 4/3 * pi * R.^3   % Volume of the sphere.

%% Calculate area of sphere
spharea == 4 * PI * r.^2    % Area of the sphere.
