Create X-axis limit?
조회 수: 3 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
채택된 답변
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.
추가 답변 (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!