Why does "insufficient input arguments" appear? Obviously, all the variables that go into the formula are specified.

1 回表示 (過去 30 日間)
function C= gaussian_plume(C,S,pi,u,sigmay,sigmaz,y,z,H,a,b,c,d,f,dx,dy,dz,i,j,k,p,L);
dx=1;
dy=1;
dz=1;
S=10000;
u=10;
H=100;
L=50; % dx,dy,dz,S,u,H,L
for i=-500:100:500;
x=i*dx;
for j= -500:100:500;
y=j*dy;
for k= 0:100:1000;
z=k*dz; % x,y,z
if(x<=1000);
a=213;,b=0.894;,c=440.80;,d=2.904;,f=9.27;,pi=3.141592; %a,b,c,d,f,pi
sigmay=a*(x^b);
sigmaz=(c*(x^d)+f);
J=(exp((-(z-H+2*p*L)^2)/2*sigmaz^2)+exp(-((z+H+2*p*L)^2)/2*sigmaz^2)); %"Not enough arguments" error occur
C=(S/(2*pi*u*sigmay*sigmaz))*exp(-y^2/2*sigmay^2)*(symsum((J),p,-inf,inf));
fprintf('%f %f %f %.15f\n',x,y,z,C);
elseif(x>1000);
a=213;,b=0.894;,c=459.7;,d=2.904;,f=-9.6;,pi=3.141592;
sigmay=a*(x^b);
sigmaz=(c*(x^d)+f);
J=(exp((-(z-H+2*p*L)^2)/2*sigmaz^2)+exp(-((z+H+2*p*L)^2)/2*sigmaz^2)); %"Not enough arguments" error occur
C=(S/(2*pi*u*sigmay*sigmaz))*exp(-y^2/2*sigmay^2)*(symsum((J),p,-inf,inf));
fprintf('%f %f %f %.15f\n',x,y,z,C);
end
end
end
end

回答 (1 件)

Abhivandan Pandey
Abhivandan Pandey 2020 年 6 月 16 日
Hi,
You haven't called the function, you just ran the function. You need to call the function with all the required arguments after defining the function.
  1 件のコメント
Walter Roberson
Walter Roberson 2020 年 6 月 16 日
However the error message is about gaussian_plume2 and we are shown gaussian_plume without the 2.
I suspect that you are correct about the cause, but we can't quite prove it.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by