coloring in imagesc
Can the functions A, B, and C be different colors?
Z = A +开发者_JAVA百科 B + C;
imagesc(Z)
colormap(gray)
Not if you add them like that, because that makes it only one function.
If you have the image processing toolbox, you can use IMSHOW to display A
,B
, and C
as red, green and blue, respectively:
Z = cat(3,A,B,C);
imshow(Z)
You may need to scale A
,B
, and C
so that their values go from 0 to 1, though.
精彩评论