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 CenterFile Exchange에서 2-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