Reputation: 145
I have 3 vectors of data: latitudes, longitudes, and elevations of specific locations. Each vector (lat, lon, elev) is a column vector with about 63 elements where element 1 of each represents a given location. What I want to do is create a topological map, or heatmap (whichever you want to call it) to map out these locations. I can plot them (like lon vs lat) no problem, but I'm not sure where to look to create a topological map. I've looked at using the surf function, but the elevations need to be a 2-D matrix for that and that would result in a lot of missing data that I just don't have.
Can someone give me some guidance here?
Upvotes: 1
Views: 1327
Reputation: 74940
You can use TriScatteredInterp
to interpolate your data onto a regular grid, which you then can use to plot the surface using surf
, or a heatmap using contourf
.
The example in the linked documentation of TriScatteredInterp
will do exactly what you need, all you need to do is replace x
, y
, and z
by your data and define the appropriate limits for meshgrid
.
Upvotes: 1