Plotting equation with specific input range

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 日

0 投票

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 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

タグ

質問済み:

2018 年 6 月 18 日

編集済み:

2018 年 6 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by