필터 지우기
필터 지우기

Pcolor 2d matrix with a different color for position value

조회 수: 2 (최근 30일)
Dave Mosooka
Dave Mosooka 2016년 12월 17일
답변: Image Analyst 2016년 12월 18일
I have a matrix with 10 rows and 10 columns. And in any of the x/y positions there could be a number from 0 to 3.
Can I pcolor the matrix with a different colour for each number from 1 to 3? Zero would be an empty space.
I am actually looking for an easy way to merge 2 different binary matrices of the same size into one pcolor figure and show where they both share a 1 as well as each matrix's own unique 1s. Value 3 would indicate where they both have a 1.

답변 (2개)

KSSV
KSSV 2016년 12월 18일

Image Analyst
Image Analyst 2016년 12월 18일
pcolor() will only show 9 columns and 9 rows, not 10 and 10. Use imshow() instead.

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by