How to use the equation y=mx+b

17 ビュー (過去 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 Center および File ExchangeGraph and Network Algorithms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by