Filter löschen
Filter löschen

How to find the elevation of a line?

2 Ansichten (letzte 30 Tage)
SUSHMA MB
SUSHMA MB am 3 Jul. 2015
Kommentiert: SUSHMA MB am 6 Jul. 2015
I have a line whose x and y coordinates are known. the line is been drawn within the x_constraint = [0,60] and similarly y_constraints = [0,40]. I also have an elevation data in a separate file of size [60 X 40]. Now i want to combine both the files and know the elevation of the line at the simultaneous coordinate. Is there a possible way of achieving it?
Thanks in advance for your replies.
  1 Kommentar
Geoff Hayes
Geoff Hayes am 4 Jul. 2015
Sushma - how is the data formatted in the first file? Is it a 60x40 array too?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 4 Jul. 2015
Yes, you can simply use improfile() to extract the elevation along the line.
numSamples = round(sqrt(diff(xi).^2 + diff(yi).^2));
[cx, cy, elevations] = improfile(elevationImage, xi, yi, numSamples)
  1 Kommentar
SUSHMA MB
SUSHMA MB am 6 Jul. 2015
elevations represents elevation data, but what is elevationImage?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Axes Transformations finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by