How to plot meshgrid without successive intervals

Respected sir,
My data set is X=1,1.5,2,2.5,3
Y=0.8351,0.8265,0.7569,0.6348,0.5219

回答 (1 件)

KSSV
KSSV 2020 年 8 月 25 日

0 投票

X=[1,1.5,2,2.5,3] ;
Y=[0.8351,0.8265,0.7569,0.6348,0.5219] ;
[X,Y] = meshgrid(X,Y) ;
plot(X,Y,'r',X',Y','r')

2 件のコメント

radha s
radha s 2020 年 8 月 26 日
I need mesh or surf figure for this data set.
KSSV
KSSV 2020 年 8 月 26 日
Already X, Y is a mesh.
X=[1,1.5,2,2.5,3] ;
Y=[0.8351,0.8265,0.7569,0.6348,0.5219] ;
[X,Y] = meshgrid(X,Y) ;
Z = sqrt(X.^2+Y.^2) ;
figure
surf(X,Y,Z)
figure
mesh(X,Y)

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

カテゴリ

質問済み:

2020 年 8 月 25 日

コメント済み:

2020 年 8 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by