# MATLAB: How to Get Index Values of an Image by imagesc

max index image imagesc image processing

Hi everyone,
I have a matrix that includes complex values. I am using imagesc to see the output. I can see the index values by using data cursor but How can I assign and get index values of that output ?
Thanks BR Hans

% Generate some sample complex image.realPart = rand(300);imaginaryPart = i * rand(300);complexImage = realPart + imaginaryPart;% Try to display complex image - won't work.% imagesc(complexImage); % Does not work.% Display the real part only.imagesc(realPart);% Set up where it will show x, y, and value in status line.impixelinfo;% Get the current colormapcmap = colormap