MATLAB Answers

Make coastline contour from DEM (3d matrix)

조회 수: 3(최근 30일)
Hello,
I have a DEM, 3d matrix with elevation coordinates depending on the xy location. I would like to create a plot (or matrix it doesn't really matter) of the coastline. The goal is to plot temperature of the area with the coastline on top of it.
I tried the different 'contour' functions but they all give me horrible results. I thought to use the imcontour function, but then I lose the 330x300 dimension of the matrix when I save the image.
Does somebody have any idea about what I could do to create this contour plot ?
Have a nice day and thank you !

  댓글 수: 0

로그인 to comment.

채택된 답변

KSSV
KSSV 18 Feb 2020
편집: KSSV 18 Feb 2020
[c,h] = contour(dem,[0.5 0.5]) ;
% filter c
idx = c(1,:)<1 ;
c(:,idx) = NaN ;
figure
pcolor(dem) ;
shading interp ;
hold on
plot(c(1,:),c(2,:),'r')

  댓글 수: 3

VICTOR DEVAUX-CHUPIN
VICTOR DEVAUX-CHUPIN 18 Feb 2020
Hello, thank you for your answer ! It's almost what I want but there is an issue with the plotting:
KSSV
KSSV 18 Feb 2020
Edited the answer.
VICTOR DEVAUX-CHUPIN
VICTOR DEVAUX-CHUPIN 18 Feb 2020
Thank you very much !!

로그인 to comment.

추가 답변(0개)

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by