This program is to evaluate a grid (array) of land elevations. One important characteristic of the grid is the number and location of the peak elevations. The number of peaks in the grid determines the level of difficulty for flying over the grid. A peak is a location whose elevation is equal to or greater than all of the surrounding points. Another important characteristic is the number and location of points that are above the timberline. The timberline is an elevation above which no trees will grow. The timberline is generally located between the average elevation and the maximum elevation. The elevation value that defines the timberline will vary depending on the geographic location of the land grid and so an appropriate value must be input by the user. One user-defined function is to be generated that will determine the location of all peaks in the land grid. A peak is defined as a point that has an equal or higher elevation than the surrounding points as seen below. Since the border points (the first and last row and the first and last column) do not have all the necessary surrounding points to check, you are not to report any peaks along the border of the grid. This user-defined function will take as input the array containing the elevation values and return as output the x and y locations of all of the peaks. Finally, the main script is to handle all input and output required as well as calling on the user-defined function and intrinsic functions for calculations. The program is to be written to operate on any data file of any size with any file name. After all of the peaks have been located, use the find function to locate the elevations that are above the timberline. Before doing this, print   to the screen the overall average elevation and the overall maximum elevation within the land grid. This will give the user important information for determining an appropriate value to use for the timberline elevation. The output from the program will include ONE plot that contains both the x and y coordinate locations of each peak and the x and y coordinate locations of all grid points above the timberline elevation. This plot is to show only markers and no lines, be sure to identify which markers represent peaks and which represent elevations above the timberline. NOTE: Do NOT print to the screen the locations of the peaks or the location of the elevations above the timberline. This would waste too much paper. Plotting these values is sufficient for this assignment. Please create a MATLAB script file acting as if you are uploading a .dat file that has all the necessary values. Using an arbitrary name for the dat file.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section: Chapter Questions
Problem 14PP
icon
Related questions
Question

This program is to evaluate a grid (array) of land elevations. One important characteristic
of the grid is the number and location of the peak elevations. The number of peaks in the grid
determines the level of difficulty for flying over the grid. A peak is a location whose elevation is
equal to or greater than all of the surrounding points. Another important characteristic is the
number and location of points that are above the timberline. The timberline is an elevation
above which no trees will grow. The timberline is generally located between the average
elevation and the maximum elevation. The elevation value that defines the timberline will vary
depending on the geographic location of the land grid and so an appropriate value must be input
by the user.
One user-defined function is to be generated that will determine the location of all peaks
in the land grid. A peak is defined as a point that has an equal or higher elevation than the
surrounding points as seen below. Since the border points (the first and last row and the first and
last column) do not have all the necessary surrounding points to check, you are not to report any
peaks along the border of the grid. This user-defined function will take as input the array
containing the elevation values and return as output the x and y locations of all of the peaks.


Finally, the main script is to handle all input and output required as well as calling on the
user-defined function and intrinsic functions for calculations. The program is to be written to
operate on any data file of any size with any file name. After all of the peaks have been located,
use the find function to locate the elevations that are above the timberline. Before doing this, print

 

to the screen the overall average elevation and the overall maximum elevation within the land grid.
This will give the user important information for determining an appropriate value to use for the
timberline elevation. The output from the program will include ONE plot that contains both the x
and y coordinate locations of each peak and the x and y coordinate locations of all grid points
above the timberline elevation. This plot is to show only markers and no lines, be sure to identify
which markers represent peaks and which represent elevations above the timberline. NOTE: Do
NOT print to the screen the locations of the peaks or the location of the elevations above the
timberline. This would waste too much paper. Plotting these values is sufficient for this
assignment.

Please create a MATLAB script file acting as if you are uploading a .dat file that has all the necessary values.

Using an arbitrary name for the dat file.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,