Question: Using matlab please give the code for this assignment: Major Assignment 2 Due Friday, November 1 5 by 1 1 : 5 9 pm The
Using matlab please give the code for this assignment:
Major Assignment
Due Friday, November by : pm
The purpose of this major assignment is to consolidate your knowledge of the material on systems of
linear equations and MATLAB functions covered up to this point.
You should submit one Matlab file following this naming format: majorID#m
eg majorm
Problem
Traffic incident duration is a measure of the time required to detect, respond, and clear an incident from
the road. Examples of these incidents include collisions, broken vehicles, fallen trees, among others. As
demonstrated in the breakdown above, the incident duration can be calculated as the sum of its time
components denoted T T and T
The following system of equations relates the time components measured in seconds of the incident
duration to three major factors that have a strong impact:
Where V is the traffic volume in vehicles per hour vph S is the average vehicle speed on the road in
kmh and L is the number of lanes blocked by the incident.
Task
If the time components of a recently recorded incident were measured as T s T s and
T s what are the corresponding factors volume speed, and lanes blocked at the time of the
incident? To answer this, write a multiline function that uses the Gauss Elimination method to solve the
system of equations and retrieve the values of the three factors. Use variable names of A matrix of
coefficients, B vector of equation values, XGauss solution vector
Page of
Task
Solve the system of equations from Task using a builtin MATLAB command to find XMat, and check
using an IF statement if the answer matches your Gauss Elimination solution. Your check should
conclude that the Gauss Elimination solution is accurate only if the error summation of all three calculated
factors does not exceed a tolerance of
Task
Assuming that the system of equations has been tested for a finite range of values of the three factors V
S and L what are all the possible incident durations that can be calculated with this system?
Factor Unit Range Step size Total scenarios
Volume V vph
Speed S kmh
Lanes blocked L
The table above lists the range, step size, and the subsequent number of possible scenarios for each of
the three factors. Using nested loops, create a vector called durations of all the possible values of
incident duration. Include a check that verifies if any of T T or T are negative, and changes the negative
value to zero. Then find the minimum and maximum incident durations in minutes of the developed
vector.
Task
Print to the command window only the following with the blanks filled automatically from your coded
solution:
Using Gauss Elimination, the time components of the reported incident indicate that the
traffic volume was vph the average speed was kmh and number of
lanes were blocked.
Validation using MATLABs builtin functions revealed that the Gauss Elimination method
was accurateinaccurate
In total, there were possible scenarios of incident duration that could be solved
using the system of equations, with a minimum of min and a maximum of
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
