Setting the coordinate axes
2 ビュー (過去 30 日間)
古いコメントを表示
Zeinab Hassanzadeh
2022 年 7 月 6 日
コメント済み: Zeinab Hassanzadeh
2022 年 7 月 7 日
I want to illustrate the vaulves of two 11*1 vectots on the same axes in the terms of t=0:0.1:1. The min and max values of these two vectors are far from each other. So, the "plot" command doesn't give the expand result of "y"-axis.
Even I applyed the "axes" command, but I didn't get suitable result again. I attached the picture of this figure. How can I asolve this problem?
Even I applyed the "axes" command, but I didn't get suitable result again. I attached the picture of this figure. How can I asolve this problem?3 件のコメント
GandaBerunda
2022 年 7 月 6 日
If yes, I guess this can help : https://mathworks.com/help/matlab/creating_plots/plotting-with-two-y-axes.html
採用された回答
Image Analyst
2022 年 7 月 6 日
Try yyaxis
t = linspace(0,10);
TSWR = sin(3*t);
yyaxis left
plot(t, TSWR, 'LineWidth', 2)
ylabel('TSWR')
xlabel('t')
OMC = 0.001 * sin(3*t).*exp(0.5*t);
yyaxis right
plot(t, OMC, 'LineWidth', 2)
ylabel('OMC')
grid on;
% ylim([-.001, 0.001])
legend('TSWR', 'OMC')
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
