Hmm, you do realize that colormap is intended to serve as a link between values of a matrix and what color they should appear as when you use image(), right?
So the size of the colormap should always be mx3 where m is the maximum value of your matrix. To set a colormap to be all white:
map = ones(m,3);
If you have a matrix N that you want to see as an image and don't know what m should be:
Since m is used as a dimension for map, it must be an integer.
for j = 1:1023
for i = 1:989
N(j,i) = [1,1,1];
end
end
This statement is invalid because within a nested for-loop, you are trying to assign a vector "[1,1,1]" to an element in N(j,i). So that's an invalid assignment.