how to Shading the intersection area?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
x0 = -5;
x1 = 5;
Nx = 301;
% Specify y range and number of points
y0 = -5;
y1 = 5;
Ny = 301;
% Construct mesh
xv = linspace(x0,x1,Nx);
yv = linspace(y0,y1,Ny);
[x,y] = meshgrid(xv,yv);
% Calculate z
q = x + i*y;
% 2nd order Runge-Kutta growth factor
g1=((196.*q.^4 - 108.*q.^3 - 1143.*q.^2 + 3888.*q + 5184).^(1/2) - 27.*q + 14.*q.^2 + 72)./(12.*(q.^2 - 6.*q + 12))
g2=-(27.*q + (196.*q.^4 - 108.*q.^3 - 1143.*q.^2 + 3888.*q + 5184).^(1/2) - 14.*q.^2 - 72)./(12.*(q.^2 - 6.*q + 12))
% Calculate magnitude of g
gmag1 = abs(g1);
gama2=abs(g2)
% Plot contours of gmag
contourf(x,y,gmag1,[1 1],'k');
hold on
contourf(x,y,gama2,[1 1],'r');
hold on
axis([x0,x1,y0,y1]);
axis('square');
xlabel('Real \lambda\Delta t');
ylabel('Imag \lambda\Delta t');
grid on;
figure
contour(x,y,[gama2,gmag1],[1 1],'r')
3 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!