How to use the equation y=mx+b

조회 수: 38 (최근 30일)
Adeke Terkumber
Adeke Terkumber 2017년 8월 1일
댓글: Star Strider 2024년 12월 6일
Please fellow users, I remember I had used the expression y=mx+b to plot a straight line graph with y = number and x = number only, values of m and b were not given. I have forgotten the code. can someone help me out of this problem? thank you.

답변 (1개)

Star Strider
Star Strider 2017년 8월 1일
x = 0 : 5;
m = 2;
b = 1;
y = m*x + b;
figure(1)
plot(x, y)
grid
axis([0 5 0 12])
  댓글 수: 2
Wassim
Wassim 2024년 12월 6일
Thank you
Star Strider
Star Strider 2024년 12월 6일
@Wassim — My pleasure!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by