Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
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

Réponses (1)

Abhivandan Pandey
Abhivandan Pandey le 16 Juin 2020
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 commentaire
Walter Roberson
Walter Roberson le 16 Juin 2020
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by