Cut out piece of matrix

3 visualizaciones (últimos 30 días)
yoni verhaegen
yoni verhaegen el 24 de Mzo. de 2017
Respondida: Iddo Weiner el 24 de Mzo. de 2017
Hello,
I have two files, DEM1 and DEM2 (see attachment). DEM1 has X,Y,elevation and DEM2 has NR,POINT,X,Y,glacier. I want to use the shape of a glacier (given by 0 = no glacier and 1 = glacier in the last column of DEM2) to cut out a piece of DEM1. Basically, I just want the DEM1 to display the elevation data in the shape of the glacier only, so I need to 'cut out' the shape of the glacier within the DEM. But the coordinates do not seem to match properly...
Can this be solved?
Thanks!

Respuestas (1)

Iddo Weiner
Iddo Weiner el 24 de Mzo. de 2017
T1 = readtable('Dem1.txt');
T2 = readtable('Dem2.txt');
Glacier_yes = find(T2.(5));
T1 = T1(Glacier_yes,:);
now T1 is a table holding data that corresponds only to entries where glacier variable was 1.

Categorías

Más información sobre Just for fun en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by