Plotting equation with specific input range

2 visualizzazioni (ultimi 30 giorni)
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'),

Risposta accettata

dpb
dpb il 18 Giu 2018
fnF=@(x) min(1,2*x./(x+5));
x=1:10;
plot(x,fnF(x))

Più risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by