How to interpolate the data inside the polygon?

4 ビュー (過去 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 件のコメント
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' ;

カテゴリ

Find more on Contour Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by