Question: Please answer the following matlab question: example help: write code that tracks a city s snow removal budget during a simulated winter season of 120

Please answer the following matlab question:

Please answer the following matlab question: example help: write code that tracks

a city s snow removal budget during a simulated winter season of

example help:

120 days. The code must implement the following requirements. a) The amount

of snow is stored for each of N roads. You may assume

write code that tracks a city s snow removal budget during a simulated winter season of 120 days. The code must implement the following requirements. a) The amount of snow is stored for each of N roads. You may assume that and contains a valid value. For example, if equals data you must maintain for the amount of snow on the roads would look something like: This would mean that currently there is no (0) snow on road 1; 10 inches of snow on road inches of snow on road 3. b) For each day you simulate, u the function how much new snow0, which will return the number of inches of snow that fell that day. It returns 0 if no snow fell. c) The amount of snow that falls should be added to the amount of snow already on each road. (For example, if 6 new inches of snow fell, then the road data listed in a) above would now be: 6, 16, 101) d) On days that it snows (and only on days that it snows), plows will be sent out. If the current day is an odd day, then only the odd roads (roads with odd indexes) will be plowed, otherwise the even roads will be plowed. All snow on a plowed road is removed (unless you run out of budget see the budget section below). e) If it does not snow, then one inch of snow will melt off every road. Remember, there can be a minimum of 0 inches on any road

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 Databases Questions!