Color that shows by the imshow, doesn't match to the color that I expect.

2 次查看(过去 30 天)
As you see in these matrix, the third column in second row must be the orange. And the second column in the first row must be the purple, but the figure does not show the correct color. How can i fix this?
  1 个评论
Jan
Jan 2022-12-15
It is easier to check the values, if you post the code as text, not as screenshot.
This is not twitter: No # before the tags. Thanks.

请先登录,再进行评论。

采纳的回答

millercommamatt
millercommamatt 2022-12-15
移动:Jan 2022-12-15
This displays as expected for me.
imshow(uint8(cat(3,...
[0 128 0;0 255 255;255 255 255;0 0 0],...
[0 0 0;255 255 128;0 255 0;255 255 255],...
[255 255 0;0 0 0;0 255 255;255 255 255])),'InitialMagnification','fit');
imshow test

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by