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
0 个评论
回答(1 个)
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
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.
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!