How to adjust the y scale of a gain and phase plots to be consistent?
4 ビュー (過去 30 日間)
古いコメントを表示
I am working with around 330 conditions that require to plot gain and phase margins. when I overlay all conditions in one plot the y-axis of the phase diagram is (-180 to 180) which is what I want. However, when I plot each condition separately the phase margin (y-axis) is inconsistent. I want it to be within -180 and 180. can anyone shed some light on this issue?
0 件のコメント
回答 (1 件)
Kiran
2015 年 12 月 30 日
編集済み: Kiran
2015 年 12 月 30 日
As per my understanding, you want to fix the y-axis range from -180 to 180 for all plots.
Following code sets the axis limits for x-axis. Similarly you can modify for y-axis.
x1 = linspace(0,10,100);
y1 = sin(x1);
ax1 = subplot(2,1,1);
plot(ax1,x1,y1)
x2 = linspace(0,5,100);
y2 = sin(x2);
ax2 = subplot(2,1,2);
plot(ax2,x2,y2)
axis([ax1 ax2],[0 10 -1 1])
This would plot figure as below: /matlabcentral/answers/uploaded_files/42552/SetAxisLimitsForMultipleAxesExample_01.png
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!