Create X-axis limit?

2 ビュー (過去 30 日間)
Jason Hodges
Jason Hodges 2017 年 6 月 11 日
コメント済み: Jason Hodges 2017 年 6 月 11 日
Hi all,
I have a plot created from the following code
close all
gm = 1e-6:1e-3:1;
grid on
hold on
%Rd = 1K
einv = 2.*sqrt((4e-9)^2+(4.*1.38e-23.*298.15.*1e3))
plot(gm,einv./(gm*1e3),'color',[0,0,0]);
%Rd = 10K
einv = 2.*sqrt((4e-9)^2+(4.*1.38e-23*298.15*10e3))
plot(gm,einv./(gm*10e3),'color',[0.25,0.25,0.25]);
%Rd = 100K
einv = 2.*sqrt((4e-9)^2+(4.*1.38e-23*298.15*100e3))
plot(gm,einv./(gm*100e3),'color',[0.5,0.5,0.5]);
%Rd = 1M
einv = 2.*sqrt((4e-9)^2+(4.*1.38e-23*298.15*1e6))
plot(gm,einv./(gm*1e6),'color',[0.75,0.75,0.75]);
xlabel ('gm (S)'); ylabel ( 'EINV_{min} (V/sqrt(Hz))');
set(gca,'xscale','log')
set(gca,'yscale','log')
legend('1K\Omega','10K\Omega','100K\Omega','1M\Omega');
%print('einv','-dpng')
Which yields the following
However, I want to implement a limit on the y-axis at 5e-9. I would like the plot to not just chop off the data below 5e-9 but rather to create a limit so that the plots asymptote towards this value. Something like this (Sorry for the crude drawing, though this is just to help get the idea across...)
Can this be done? If so, would anybody be so kind to show me how I can achieve this?
Thank you in advance.

採用された回答

Image Analyst
Image Analyst 2017 年 6 月 11 日
How about if you just add 5e-9 to all numbers:
close all
gm = 1e-6:1e-3:1;
grid on
hold on
%Rd = 1K
einv = 2.*sqrt((4e-9)^2+(4.*1.38e-23.*298.15.*1e3))
einv = einv./(gm*1e3) + 5e-9;
plot(gm,einv,'color',[0,0,0], 'LineWidth', 2);
%Rd = 10K
einv = 2.*sqrt((4e-9)^2+(4.*1.38e-23*298.15*10e3))
einv = einv./(gm*10e3) + 5e-9;
plot(gm,einv,'color',[0.25,0.25,0.25], 'LineWidth', 2);
%Rd = 100K
einv = 2.*sqrt((4e-9)^2+(4.*1.38e-23*298.15*100e3))
einv = einv./(gm*100e3) + 5e-9;
plot(gm,einv,'color',[0.5,0.5,0.5], 'LineWidth', 2);
%Rd = 1M
einv = 2.*sqrt((4e-9)^2+(4.*1.38e-23*298.15*1e6))
einv = einv./(gm*1e6) + 5e-9;
plot(gm,einv,'color',[0.75,0.75,0.75], 'LineWidth', 2);
xlabel ('gm (S)'); ylabel ( 'EINV_{min} (V/sqrt(Hz))');
set(gca,'xscale','log')
set(gca,'yscale','log')
legend('1K\Omega','10K\Omega','100K\Omega','1M\Omega');
%print('einv','-dpng')
Looks fairly good to me.
  1 件のコメント
Jason Hodges
Jason Hodges 2017 年 6 月 11 日
Oh boy, silly me. Such a simple solution!
Thank you kindly.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by