not enough input arguments Urgent Help
1 view (last 30 days)
Show older comments
function [V] = Tank_Volume(R, h, L, H)
% h is fluid height
% R is radius of tank
% H is tank height
% L is the lenght of the tank
if h<0
error('Please fill the tank!!') ;
elseif h>=0 && h<R
V= L*(R^2*acos((R-h)/R)-(R-h)*sqrt(h(2*R-h))) ;
elseif h>=R && h<=H
V=(L*((pi*R^2)/2+((h-R)*2*R)));
else
error('Do not waste alcohol, drink it instead!!') ;
end
Not enough input arguments.
Error in Tank_Volume (line 18)
elseif h>=R && h<=H
Error in Main_Code (line 16)
V(i)=Tank_Volume(h(i),R,H);
0 Comments
Answers (1)
Star Strider
on 17 Sep 2021
The function declaration is:
function [V] = Tank_Volume(R, h, L, H)
and the function call is:
V(i)=Tank_Volume(h(i),R,H);
.
0 Comments
See Also
Categories
Find more on Fluid Dynamics 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!