Plotting equation with specific input range

2 Ansichten (letzte 30 Tage)
Najiya Omar
Najiya Omar am 18 Jun. 2018
Bearbeitet: Najiya Omar am 18 Jun. 2018
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'),

Akzeptierte Antwort

dpb
dpb am 18 Jun. 2018
fnF=@(x) min(1,2*x./(x+5));
x=1:10;
plot(x,fnF(x))
  1 Kommentar
Najiya Omar
Najiya Omar am 18 Jun. 2018
Bearbeitet: Najiya Omar am 18 Jun. 2018
Thank you very much. works perfectly

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by