How to use the equation y=mx+b

17 visualizzazioni (ultimi 30 giorni)
Adeke Terkumber
Adeke Terkumber il 1 Ago 2017
Commentato: Star Strider il 6 Dic 2024
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.

Risposte (1)

Star Strider
Star Strider il 1 Ago 2017
x = 0 : 5;
m = 2;
b = 1;
y = m*x + b;
figure(1)
plot(x, y)
grid
axis([0 5 0 12])

Categorie

Scopri di più su Graph and Network Algorithms in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by