Unable to publish even though no errors present
2 views (last 30 days)
Show older comments
It fails to publish the code even though there are no errors, and it is stuck trying to debug the program Here's the code that fails to run:
%% Question 1
function volume = tankvol2(lwrDiameter, uprDiameter, hOfCyl, hOfFru, waterLvl)
if(waterLvl<0)
H=hOfCyl;
h=hOfFru;
R=uprDiameter/2;
r=lwrDiameter/2;
x1 = (pi*R*R)/3;
x=x1*(H+h);
y = ((pi*r*r*H)/3);
volume = x - y;
%Convert volume in meters cubed
result = volume * 0.000001;
fprintf('Volume in m^3 = %fm^3.\n' ,result);
end
end
0 Comments
Answers (0)
See Also
Categories
Find more on 3-D Volumetric Image Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!