not enough input arguments Urgent Help

1 visualizzazione (ultimi 30 giorni)
Rey Perez
Rey Perez il 16 Set 2021
Risposto: Star Strider il 17 Set 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);

Risposte (1)

Star Strider
Star Strider il 17 Set 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);
.

Categorie

Scopri di più su Fluid Dynamics in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by