Bonjour,
J'ai un problème concernant mon code, et notamment avec la fonction dblquad :
Matlab me sort ceci :z=1; y=1; sigma=1; P=5;
a=@(p,phi)((p*z*sigma)/((((p*cos(phi)).^2)+((y+p*sin(phi)).^2)+(z.^2)).^(3/2)));
b=dblquad(a,0,P,0,2*pi)
B(1,1)=b
alors que j'ai totalement pompé mon code sur l'aide Matlab :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 Error using quad (line 79) The integrand function must return an output vector of the same length as the input vector. Error in dblquad>innerintegral (line 77) Q(i) = quadf(intfcn, xmin, xmax, tol, trace, y(i), varargin{:}); Error in quad (line 76) y = f(x, varargin{:}); Error in dblquad (line 53) Q = quadf(@innerintegral, ymin, ymax, tol, trace, intfcn, ...
Pourriez-vous m'aider ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 F = @(x,y)y*sin(x)+x*cos(y); Q = dblquad(F,pi,2*pi,0,pi);
Merci d'avance !
Apeth
Partager