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 CenterFile Exchange에서 Downloads에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by