not enough input arguments Urgent Help

1 Ansicht (letzte 30 Tage)
Rey Perez
Rey Perez am 16 Sep. 2021
Beantwortet: Star Strider am 17 Sep. 2021
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);

Antworten (1)

Star Strider
Star Strider am 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);
.

Kategorien

Mehr zu Fluid Dynamics finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by