Converting x y coordinates to a 2D matrix

조회 수: 2 (최근 30일)
Sowmya MR
Sowmya MR 2018년 1월 18일
댓글: Jos (10584) 2018년 1월 18일
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에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by