Question: 1 . Create a function called mb _ line.m that takes as input two points, identified as ( x 1 , y 1 ) and
Create a function called mbline.m that takes as input two points, identified as xy and x y and produces the output of slope and yintercept value.
Create a script called useline.m that does the following
a gets the x and y values for two points on the line include request for x and y
b calculates the slope and b value;
c plots a figure with the line using a grid and blue color line
d create a title that includes the equation and the value of slope and yintercept value
e create a label on the x axis that shows the x values of each point defined earlier
f create a label on the yaxis that shows the y values of each point defined earlier
g plot the points as red signs" on top of the line
Please note you may need a specific command executed between the two plots to keep the line and its points on the same figure
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
