Different values in matrix and in the plot of image
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
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
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!