Write a simple script that will calculate the volume of a hollow sphere,
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:3| Question number:2.3
All Answers
total answers (1)
Ch3Ex2.m
% This script calculates the volume of a hollow sphere
% Assign values for the inner and outer radii
ri = 5.1
ro = 6.8
% Calculate the volume
vol = (4*pi)/3*(ro^3-ri^3)
need an explanation for this answer? contact us directly to get an explanation for this answer