I have a matrix that I have called IMAGE1 and consists of the following values:
[1225 534; 532 212; 1315 440; 39 1 ; 1542 503; 1509 902]
These values represent x and y positions of a satelite.
I am trying to create an image that has a black background and the above coordinates are red.
I have tried the following to accomplish this:
IMAGEPIC1 = zeros(1600)
IMAGEPic1(IMAGE1(:,1),IMAGE1(:,2)) = 1 %to change the pixels to red
I end up with a black image with a grid of points because I believe Matlab is referencing every combination of IMAGE1's x and y values.
I have tried using sub2ind with no better results.
Is there a better way to produce an image with a black background and red pixels at the referenced coordinates?
Any help you can provide is appreciated.