- #1
jdawg
- 367
- 2
Homework Statement
The volume V of a liquid in a partially filled ellipsoid shaped tank is given by
V = (pi/3)*(3*a-h)*(((b^2)*(h^2))/(a^2))
Develop an M-file to create a plot of volume versus depth. Here are the first few lines:
function myellipsoid(a,b,plot_title)
% Volume of horizontal ellipsoid
% Inputs:
% a - vertical semiaxis
% b - horizontal semiaxis
% plot_title - string holding plot title Test your program with:
>> myellipsoid(2,5,'Volume versus depth for ellipsoid')
I'm having trouble with this function, I'm not really sure what I'm doing wrong.