Different values in matrix and in the plot of image

조회 수: 2 (최근 30일)
Joaquim
Joaquim 2017년 1월 27일
답변: Adam 2017년 1월 27일
Hello everybody,
I have a matrix A with double precision, 198*198 of size.Ploting the image using imshow(A,[]) and search using the Data cursor the value for the voxel (90,90) I get a value x, which is expected. However, using the command window to obtain the same value A(90,90) the value that I obtain is completely different of x. Can somebody explain why this happens and how can I get the value x in the command window?
Thank you in advance, Joaquim
  댓글 수: 3
Joaquim
Joaquim 2017년 1월 27일
(90,90) was just an example. Thank you, it solved the problem!
Adam
Adam 2017년 1월 27일
I'll add it as an answer then. Given that example I wasn't confident it was a solution, hence the comment instead.

댓글을 달려면 로그인하십시오.

채택된 답변

Adam
Adam 2017년 1월 27일
You have to be careful with X,Y and rows, columns when indexing into a matrix. To get the value reported as X,Y you need to index your data as data(Y,X) although obviously for 90,90 this would make no difference.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by