plotting shaded area of integral

6 visualizaciones (últimos 30 días)
Ikenna Iwudike
Ikenna Iwudike el 23 de Abr. de 2022
Respondida: Star Strider el 23 de Abr. de 2022
F = @(x,y) y.*sqrt(x.^2 - y.^2);
ymax = @(x)x;
q= integral2(F,1,2,0,ymax)
How do you plot the shading of the region over which this integral extends.

Respuesta aceptada

Star Strider
Star Strider el 23 de Abr. de 2022
The function creates a surface, and the integral has only a scalar value, so perhaps something like this —
F = @(x,y) y.*sqrt(x.^2 - y.^2);
ymax = @(x)x;
q= integral2(F,1,2,0,ymax)
q = 1.2500
x = linspace(1, 2, 10);
y = linspace(0, ymax(max(x)), 10);
[X,Y] = ndgrid(x,y);
% cplxsurf = F(X,Y)
figure
surf(X, Y, real(F(X,Y)))
hold on
surf(X, Y, imag(F(X,Y)))
hold off
grid on
colormap(turbo)
title('Complex')
figure
surf(X, Y, abs(F(X,Y)))
grid on
colormap(turbo)
title('Absolute Value')
Make appropriate changes to get the desired result.
.

Más respuestas (0)

Categorías

Más información sobre Numerical Integration and Differentiation en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by