필터 지우기
필터 지우기

How to reassign the label?

조회 수: 2 (최근 30일)
Tan Wen Kun
Tan Wen Kun 2015년 12월 7일
댓글: Walter Roberson 2015년 12월 7일
I got a table which show
table =
label 1 2 3 4 5 6 7 8 9
value 1 2 2 2 5 6 7 5 5
matrix =
1 1 1 1 1 1 1 1
1 2 2 1 3 1 4 1
1 1 1 1 3 1 4 1
1 5 5 1 1 1 1 1
1 1 1 1 6 6 6 1
1 7 7 1 1 1 1 1
1 1 1 1 8 1 9 1
1 1 1 1 1 1 1 1
I want to loop the matrix and reassign the label follow the value of table
final outcome =
1 1 1 1 1 1 1 1
1 2 2 1 2 1 2 1
1 1 1 1 2 1 2 1
1 5 5 1 1 1 1 1
1 1 1 1 6 6 6 1
1 7 7 1 1 1 1 1
1 1 1 1 5 1 5 1
1 1 1 1 1 1 1 1

채택된 답변

Walter Roberson
Walter Roberson 2015년 12월 7일
final_outcome = value(matrix);
No loop needed.
  댓글 수: 2
Tan Wen Kun
Tan Wen Kun 2015년 12월 7일
after get final_outcome, I want change to 3D matrix like
final_outcome =(:,:,1)
final_outcome =(:,:,2)
final_outcome =(:,:,3)
then I want to assign each label to a unique color like label 1 equal to black color(0,0,0)
label 2=white color(255,255,255)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by