Make coastline contour from DEM (3d matrix)

4 ビュー (過去 30 日間)
V.D-C
V.D-C 2020 年 2 月 18 日
コメント済み: V.D-C 2020 年 2 月 18 日
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 !

採用された回答

KSSV
KSSV 2020 年 2 月 18 日
編集済み: KSSV 2020 年 2 月 18 日
[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 件のコメント
KSSV
KSSV 2020 年 2 月 18 日
Edited the answer.
V.D-C
V.D-C 2020 年 2 月 18 日
Thank you very much !!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by