Not Enough Input Arguments
Afficher commentaires plus anciens
I've been trying to run the following function, but cannot get it to run without the above error. I have a script file that includes values for all of the input arguments listed. Can anyone spot an error that I'm missing?
function [ New_Phi ] = New_Phi_well( x,y,xw,yw,rw,Q,L,d,Qx0,Phi0 )
rsq=(x-xw)^2+(y-yw)^2;
rwsq=rw^2;
if rsq<rwsq
New_Phi=0;
else
New_Phi=Q/(2*pi)*(log(rsq/rwsq)/(log(L-d)-log(L+d)))-Qx0+Phi0;
end
end
1 commentaire
KSSV
le 29 Fév 2016
It is simple.....you are not providing all the inputs the functions needs.
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 29 Fév 2016
It is not enough that the script defines values with the same name as the parameters: you have to put the values in the calling sequence positionally.
So for example you cannot define values for x, y, xw, yw, rw, Q, L, d, Qx0, and Phi0, and then invoke
result = New_Phi_well;
You need to instead
result = New_Phi_well( x,y,xw,yw,rw,Q,L,d,Qx0,Phi0 );
providing each variable into its proper position.
2 commentaires
Timmy1400
le 29 Fév 2016
Walter Roberson
le 29 Fév 2016
We need to see your code and we need to see the exact error message.
Catégories
En savoir plus sur Troubleshooting dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!