Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions

Question

=+b) Why does the interns suggestion make sense?

Answered: 1 week ago