Info
此问题已关闭。 请重新打开它进行编辑或回答。
Problems with the Y axis of my graph
1 次查看(过去 30 天)
显示 更早的评论
Hello, please, I would like the Y axis of my graph 1 to be the same as that of graph 2
G1)
G2)
e_inf = 11.7 ;
Wp1 = 1.0856e11;
gamma1 = 2.3518e9 ;
Wp2 = 3.4330e11;
gamma2 = 5.6747e9 ;
Wp3 = 1.0856e12;
gamma3 = 8.8952e9 ;
Wp4 = 3.4330e12;
gamma4 = 3.2292e10;
w1 = 1e13;
w2 = 1e10;
w3 = 1e15;
index = 0;
K = w1:w2:w3;
% Loop is not necessary!
e1 = e_inf - ((Wp1^2)./K.^2+1i*K*gamma1);
e2 = e_inf - ((Wp2^2)./K.^2+1i*K*gamma2);
e3 = e_inf - ((Wp3^2)./K.^2+1i*K*gamma3);
e4 = e_inf - ((Wp4^2)./K.^2+1i*K*gamma4);
f=K;
x=f;
figure
y1 = real(e1);
semilogx(x,y1, 'b-','linewidth',2, 'displayName', 'e_1')
hold on
y2 = real(e2);
semilogx(x,y2, 'g-', 'linewidth',2,'displayName', 'e_2'), grid on
y3 = real(e3);
semilogx(x,y3, 'r-', 'linewidth',2,'displayName', 'e_3'), grid on
y4 = real(e4);
semilogx(x,y4, 'black-', 'linewidth',2,'displayName', 'e_4'), grid on
hold off
legend('toggle')
2 个评论
Walter Roberson
2022-12-30
How does this differ from https://www.mathworks.com/matlabcentral/answers/1886627-problems-with-my-2d-graph?s_tid=srchtitle ?
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!