Plotting equation with specific input range

2 ビュー (過去 30 日間)
Najiya Omar
Najiya Omar 2018 年 6 月 18 日
編集済み: Najiya Omar 2018 年 6 月 18 日
I want to plot the equation for x=1-10. However, the plot should just include the out put values less or equale to one and if the value more than one just make one.y>=1
y=(2.*x)./(x+5)
% plot(x,y,'k'),

採用された回答

dpb
dpb 2018 年 6 月 18 日
fnF=@(x) min(1,2*x./(x+5));
x=1:10;
plot(x,fnF(x))
  1 件のコメント
Najiya Omar
Najiya Omar 2018 年 6 月 18 日
編集済み: Najiya Omar 2018 年 6 月 18 日
Thank you very much. works perfectly

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by