Question: 1 . Create a function called std _ line.m that takes as input A coefficient of x , B coefficient of y and constant C

1. Create a function called std_line.m that takes as input A coefficient of x, B coefficient of y and constant C in the standard form of the equation of a line Ax+By=C and produces the output of slope and yintercept value. Write comment information to help the user.
2. Create a function called ptm_line.m that takes as input a point, indentified as (x1, y1), and the slope m in the point slope form of the equation of a line (y-y1)=m(x-x1) and produces the output of yintercept value.
3. Create a script called LinEq.m and use functions mb_line, Std_line, and ptm_line to do the following:
(a) provide a user menu to pick from 3 choices of forms of linear equation and exit
*(b) use a flow control mechanism to allow user to continuously pick and plot multiple linear equations
*(c) present the menu and capture a choice
(d) use the if construct to get parameters from the user according to the selected choice
(e) calculate slop (if necessary) and yintercept using function associated with the selection
(f) make sure to include both an exit from the if construct and report an error condition when appropriate
(g) define the domain and range values and create a plot
(h) use the switch construct to define the title for the each plot according to the form of the equation
(i) for standard form equation:
(i1) create an x axis label with slope and yintercept values
(i2) display a green * on the yintercept location
(j) for point slope form equation:
(j1) create an x axis label and display the yintercept value
(j2) display a green * on the yintercept location
(j3) display a red + on the point entered by the user
(k) for slope intercept form equation:
(k1) no x axis label is required
(k2) display a green * on the yintercept location
(k3) display a red + on each point entered by the user
(m) save each plot created with a unique filename
(n) check for error conditions and deal with them gracefully

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!