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

Answers (1)

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 Comments

I need mesh or surf figure for this data set.
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)

Sign in to comment.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Asked:

on 25 Aug 2020

Commented:

on 26 Aug 2020

Community Treasure Hunt

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

Start Hunting!