How to get effective parameter graph?

1 次查看(过去 30 天)
I am currently practicing drawing an effective parameter graph using the transfer matrix component. However, the paper does not describe the detailed method, so I am working on the code myself, but what should come out in the form of left figure is that if I plot with the code I wrote, it will come out in the form of right, which part should I modify? I attached my code.

回答(1 个)

Sulaymon Eshkabilov
Without seeing your data, one quick suggestion is:
Using yyaxis option for two different data sets and use y-axis limit, e.g.:
t=0:1/500:2.5;
y = 5*sin(2*pi*t);
z = 5*tan(2*pi*t);
yyaxis left
plot(t,y, 'b')
ylabel('y(t)')
G=gca;
G.YColor = 'b';
yyaxis right
plot(t,z, 'r-.')
H=gca;
H.YColor='r';
ylabel('z(t)')
ylim([-500 500])
grid on
xlabel('time')
legend('5sin(t)', '5tan(t)')

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by