How to interpolate the data inside the polygon?

조회 수: 12 (최근 30일)
TAPAS
TAPAS 2022년 12월 6일
답변: KSSV 2022년 12월 9일
I have the data in the vertical column( A,B,C,D,E,F,G,H) and the solid dot in each column represents the data location.
I want to interpolate the data inside the polygon(KLMNOPQRSTU) only ,as given in the attached figure.
  댓글 수: 6
KSSV
KSSV 2022년 12월 7일
TAPAS
TAPAS 2022년 12월 9일
I tried but getting an absurd figure

댓글을 달려면 로그인하십시오.

답변 (1개)

KSSV
KSSV 2022년 12월 9일
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1222307/Book2.xlsx') ;
x = T.X ;
y = T.Y ;
z = T.Z ;
[X,Y] = meshgrid(min(x):90:max(x),min(y):1:max(y)) ;
Z = griddata(x,y,z,X,Y) ;
pcolor(X,Y,Z)
h = pcolor(X,Y,Z) ;
h.EdgeColor = 'none' ;

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by