How can i setting the limit values of a variable?

조회 수: 47 (최근 30일)
Alessio Baiocco
Alessio Baiocco 2022년 7월 7일
댓글: Moe_2015 2022년 7월 7일
Hello everyone. It could be useful setting the minimum and max values of a variable, or at least (less useful but appreciated) a "limited/already zoomed plot". For example, i have x=-12:1:15 and y=something(x), but i search only 2<=y<=7 and plot it with x. How can i do?
In the real example i wolud like 0<=xa<=1, or directly on the script or undirectly on the plot. Thank you.
(i have an old pc, actually running matlab 2014, i can't select it on the options of the question)
T=280:1:600;
k=10^(-3).*exp(-10^4.*(1./T-1/298));
xa=((800*3)/(400*10^3)).*(T-298);
V=(0.06./k).*(xa./(1-xa));
figure
plot(xa,V)

채택된 답변

Moe_2015
Moe_2015 2022년 7월 7일
If you want the plot to show only a certain range of x then you can use xlim command
xlim([0 1])
  댓글 수: 2
Alessio Baiocco
Alessio Baiocco 2022년 7월 7일
Thank you! I appreciate it.
Moe_2015
Moe_2015 2022년 7월 7일
No problem, anytime!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by