Question: 1 . Create a function called std _ line.m that takes as input A coefficient of x , B coefficient of y and constant C
Create a function called stdline.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 AxByC and produces the output of slope and yintercept value. Write comment information to help the user.
Create a function called ptmline.m that takes as input a point, indentified as x y and the slope m in the point slope form of the equation of a line yymxx and produces the output of yintercept value.
Create a script called LinEq.m and use functions mbline, Stdline, and ptmline to do the following:
a provide a user menu to pick from 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:
i create an x axis label with slope and yintercept values
i display a green on the yintercept location
j for point slope form equation:
j create an x axis label and display the yintercept value
j display a green on the yintercept location
j display a red on the point entered by the user
k for slope intercept form equation:
k no x axis label is required
k display a green on the yintercept location
k 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
