How can I send or transfer matrix data into empty image?

1 次查看(过去 30 天)
Hello experts,
Can any one suggest me how to send or transfer matrix(132x1000) data into empty image? here, what makes me curious about image is that,how does an image pixel create in empty image(need some explanation) and would like to see resulted image in colour view.Please help me. Thanks in advance.

采纳的回答

Walter Roberson
Walter Roberson 2013-7-5
If you have no existing image object in your axes, then you need to use image() to create the image object. imagesc() and imshow() call upon image() to create the image object.
If you have an existing image object, then you can change which image it shows by updating the CData property of the image object. For example,
im1 = image(rand(65,65));
pause(3);
set(im1, 'CData', rand(32, 96));
pause(3)
will draw an image, leave it for 3 seconds, and then update the image object with new data.
If the CData property associated with an image object is a scalar or a vector or is 2 dimensional, then the current colormap() will be used to determine the colors the image object is displayed with. If the CData property associated with the image object is a 3D matrix in which the third dimension is length 3 (an M x N x 3 array), then the CData will be interpreted as RGB color information and the colormap() will not be used for that image object.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Red 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by