showing the grayscale matrix
1 回表示 (過去 30 日間)
古いコメントを表示
I have a 2D matrix , and I was trying to display it as an image, but the problem is that in the output axes, for all the numbers except 0, I see white in result, and black for zero, I want to see all gray colors (in grayscale) from black to white, what can I do? this is the resault I see
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155494/image.jpeg)
0 件のコメント
採用された回答
Image Analyst
2014 年 1 月 23 日
It's probably a type double, which needs to be in the range 0-1, not 0-255 that you probably have. You can autoscale with []. Try
imshow(your2Dmatrix, []);
2 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!