Question: Write an m - file that computes y values for two straight lines straight lines based on the formula y = mx + b using
Write an mfile that computes y values for two straight lines straight lines based on the formula y mx b using the following information.
Define row vectors x and x as follows:
x a vector that starts at and ends at with increments of
x a vector that starts at and ends at with data points
Calculate the vectors: y and y using the equation of a line use m & b with x etc. given the following slopes and yintercepts:
m; b
m; b
Do not display any of your x or y values to the command window.
Using the array functions and indexing taught in class, determine and output:
The average value of y
the value of x for the largest value of y
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
