I am new in matlab just wondering how to fix this problem . Thank you
Not enough input arguments.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Alexander Cordero
le 16 Déc 2019
Commenté : Alexander Cordero
le 16 Déc 2019
function [xi,w] = GaussInt2Pt()
xi = [-sqrt(1/3) sqrt(1/3)];
w = [1 1];
return;
end
function [N,B,Jac] = shapeQuadratic(x1,x2,x3,xi)
%%Le = x3- x1;
N = (1/2)*[(-xi+xi^2) 2*(1-xi^2) (xi+xi^2)];
Jac = [(1/2)*(-1+2*xi) -2*xi (1/2)*(1+2*xi)]*[x1;x2;x3];
B = diff(N)/Jac;
return;
end
2 commentaires
Réponse acceptée
dpb
le 16 Déc 2019
Modifié(e) : dpb
le 16 Déc 2019
Looks disjointed in the error message but in
function [N,B,Jac] = shapeQuadratic(x1,x2,x3,xi)
there are four arguments required and your call above has only three...that would give rise to the error "not enough input arguments".
Simple example that can do at command line...
>> fn=@(x,y,z,xi) sum([x,y,z,xi]); % define anonymous function needs four inputs
>> fn(1,2,3,4) % call with four arguments -- get expected
ans =
10
>> fn(1,2,3) % try with only three...boom!
Not enough input arguments.
Error in @(x,y,z,xi)sum([x,y,z,xi])
>>
The solution of the problem is simple--supply the additional needed input.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!