Getting integrand error from triple integral code code
35 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Code:
% Define the function to integrate
f = @(x, y, z) 1;
% Define the bounds
xmin = -2;
xmax = 2;
% Define ymin and ymax as functions of x
ymin = @(x) -sqrt((4 - x.^2)./3);
ymax = @(x) sqrt((4 - x.^2)./3);
% Define zmin and zmax as functions of x and y
zmin = @(x, y) 4 - x.^2 - 3.*y.^2;
zmax = @(x, y) x.^2 + y.^2;
% Perform the triple integral
result = integral3(@(x,y,z) f(x,y,z), xmin, xmax, ymin, ymax, zmin, zmax);
Error:
Error using integral2Calc>tensor (line 253)
Integrand output size does not match the input size.
Error in integral2Calc>integral2t (line 55)
[Qsub,esub,FIRSTFUNEVAL,NFE] = tensor(thetaL,thetaR,phiB,phiT,[],[], ...
Error in integral2Calc (line 9)
[q,errbnd] = integral2t(fun,xmin,xmax,ymin,ymax,optionstruct);
Error in integral3>innerintegral (line 128)
Q1 = integral2Calc( ...
Error in integral3>@(x)innerintegral(x,fun,yminx,ymaxx,zminxy,zmaxxy,integral2options) (line 111)
f = @(x)innerintegral(x, fun, yminx, ymaxx, ...
Error in integralCalc>iterateScalarValued (line 334)
fx = FUN(t);
Error in integralCalc>vadapt (line 148)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen, ...
Error in integralCalc (line 77)
[q,errbnd] = vadapt(vfunAB,interval, ...
Error in integral3 (line 113)
Q = integralCalc(f,xmin,xmax,integralOptions);
Error in Calc3Project3AlexDavies (line 18)
result = integral3(@(x,y,z) f(x,y,z), xmin, xmax, ymin, ymax, zmin, zmax);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Calculus finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!