| Announcements | Syllabus | Schedule | Weekly lecture notes | Links |
%CHANGE THINGS BETWEEN HERE
%set parameters:
%number of x and y nodes for grid
%make these smaller if you get an error about exceeding the max array size
nx = 100;
ny = nx;
%contour interval (this is in the units of the elevation data):
ci = 2;
Remember that the % sign is the beginning of a comment that the program will ignorenx = 10, nx = 25, nx = 100, and nx = 250. Print out figures 2, 3, and 6 for each and write a paragraph describing the changes as you increased the grid resolution. Which do you think is optimal and why (obviously too coarse does not sufficiently represent the landscape, and too fine takes too long to run and is overkill)?
ci = 2 meters to others like 0.1 m to 10 m. What do you think is the optimal contour interval for this map? Print out the version of the linear interpolation (figure 3) that you think is best.
griddata into the function name box. Explain in your own words what our script is doing with this command and why there might be difference between the linear and cubic methods. On what lines is it used in the topographic_map_script.m?
dx = 50; %grid resolution would be 50 foot spacing between grid nodes), rather than the number of grid points in the prior case. The search radius is computed as search_radius = sqrt(2).*dx./2, which for a 10 foot grid spacing is 7.071 feet. This figure shows how the search radius (red circle) compares with the grid nodes (plus symbols): searching.gif.
dx = 50, dx = 10, and dx = 5. That will increase the grid resolution progressively from 50 feet to 10 feet to 5 feet. It may take a while for the 5 foot version to run (took about 8 minutes on my machine. If it goes for longer than about half an hour, push control c and try a different machine). You should be able to see the river (because the laser shots did not return from the water) and its bend as is manifest in the photograph (http://www.californiacoastline.org).