Question: Equation of a Line: Background: plot: Matlab has built - in plot ( x , y ) function. Execute doc plot command for details. Color

Equation of a Line:
Background:
plot: Matlab has built-in plot(x,y) function. Execute "doc plot" command for details.
Color parameter: To change color of a line, you could use an argument while calling plot function. Example: plot(x,y,'r') where 'r' stands for red. Color codes are given below.
\table[[Short Name,Long Name],[y,yellow],[m,magenta],[c,cyan],[r,red],[g,green],[b,blue],[w,white],[k,black]]
Plotting multiple equations: Every time you call plot function, it pops up a new figure window. To plot multiple equations in the same figure, use "hold on;" function after you call plot function.
Grid: "grid on;" command turns on the grid in the figures.
Problem Statement:
y=mx+b
a.m is slope
b.y-intercept is b
c.x-intercept is -bm
Implement a Matlab code plotting 3 different line equations in the SAME plot. ?()y=mx+b where:
x is between -10 and +10 with
Linear spacing between values are 0.1(Hint: Use x=-10:0.1:10)
a) Red color
 Equation of a Line: Background: plot: Matlab has built-in plot(x,y) function.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!