Converting x y coordinates to a 2D matrix

8 次查看(过去 30 天)
Hi,
I have two vectors: X and Y corresponding to an image. Now if i do plot(X,Y) i get a nice image plot but i want to convert X and Y to a 2D matrix. Can someone please help?
  1 个评论
Jos (10584)
Jos (10584) 2018-1-18
What does "corresponding to an image" means?
Can you give a small example of some artificial input and expected output?

请先登录,再进行评论。

回答(1 个)

KSSV
KSSV 2018-1-18
x = unique(X) ;
y = unique(Y) ;
[X2d,Y2d] = meshgrid(x,y) ;

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by