how to Shading the intersection area?

1 回表示 (過去 30 日間)
sadeem alqarni
sadeem alqarni 2018 年 9 月 30 日
コメント済み: sadeem alqarni 2018 年 10 月 1 日
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 件のコメント
KSSV
KSSV 2018 年 10 月 1 日
You need to explain more....question is not clear.
sadeem alqarni
sadeem alqarni 2018 年 10 月 1 日
   iwant to  Shading the intersection area for g1,g2 ?
  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))

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by