MATLAB: I am geeting an error as “??? Input argument “int_H” is undefined.

undefined input arguments

I post here the function and the line that gives me this error: gas_species_balance.m file
function [C_species] = gas_species_balance(Gen_species, ...
C_species,int_H,int_r, A_r,A_z, v_r,v_z,vol,dt,ep)
relpar_species =1.0;
err_species=1.0;
iter_species=0;
while err_species>10^-3
iter_species=iter_species+1;
if iter_species>100
break;
end
for i=2:int_H+1
for j=1:int_r
aP(i,j)=0.;
source(i,j)=0.;
aPrev=ep(i,j)*vol(i,j)/dt;
aP(i,j)=aP(i,j)+aPrev(i,j);

Best Answer

There are several missing end statements in the code.
10^-3 is an expensive power operation, while 1e-3 is a cheap constant.
Please post (and read) the complete error message. The offending line might contain a call like gas_species_balance(a, b), while the later input arguments are missing.