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 Center および File ExchangeGraphics Performance についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by