Question: 1 . Create a function called mb _ line.m that takes as input two points, identified as ( x 1 , y 1 ) and

1. Create a function called mb_line.m that takes as input two points, identified as (x1,y1) and (x2, y2) and produces the output of slope and yintercept value.
2. Create a script called use_line.m that does the following
(a) gets the x and y values for two points on the line (include request for -5<=x<=5 and -5<=y<=5)
(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 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 Programming Questions!