A Matlab question# Computation - 科学计算
b*e
1 楼
I have a matrix, looks like:
A=[1 1 1 2 2 3 3 3 4 4 4 4;
1 1 2 2 2 2 3 3 4 4 4 4;
1 1 2 2 3 3 3 4 4 4 4 4;
1 1 2 2 3 3 4 4 4 4 4 4]
I want to display it as an image. Different number uses different
color. Such like, 1 = red, 2 = blue, 3 = yellow, 4 = black.
How to do this in matlab?
Thanks a lot.
A=[1 1 1 2 2 3 3 3 4 4 4 4;
1 1 2 2 2 2 3 3 4 4 4 4;
1 1 2 2 3 3 3 4 4 4 4 4;
1 1 2 2 3 3 4 4 4 4 4 4]
I want to display it as an image. Different number uses different
color. Such like, 1 = red, 2 = blue, 3 = yellow, 4 = black.
How to do this in matlab?
Thanks a lot.