for this matrix: >> A=rand(10,7) >> A=im2bw(A)
Can you write a code like this? And with this method to write an image of the matrix A?(This is a simple form of what is going)
>> for i=1:10 >> for j=1:7 >> imshow(A(i,j)) >> end >> end
And finally the results are similar to this picture?
No products are associated with this question.
Yes, it is possible, just very very inefficient. You can create one patch object per pixel, with the edge turned off, and the facecolor set to the pixel color. This is the closest thing MATLAB has to a pixel object.
It might take a few hours to render a single image this way: MATLAB is not designed for efficiency when it comes to having thousands of graphics objects on a single figure.
One idea would be to use the AlphaData property. This sets the transparency of each pixel:
A = im2bw(rand(10,7)); M = zeros(size(A'));
h = imshow(A, 'InitialMagnification' ,2000); for n = 1:numel(M); M(n) = 1; set(h,'AlphaData',M'); drawnow; end
in a image :Can I change data of a pixel ? without drawing all of picture again, and re show only one pixel?
Why do you want to do this? Plot one pixel at a time? Your code shows one pixel only, not a whole image with just one pixel in the image changing. Maybe you'd be interested in the FAQ about making a movie of your data: http://matlab.wikia.com/wiki/FAQ#How_can_I_create_a_movie_from_my_MATLAB_figures.3F