% Consider a matrix B and fill it with default values
B = zeros(200,200);
for i = 1:200
for j = 1:200
B(i,j) = 1500 - i + 1;
end
end
% Display image
figure;
image(B);
输出的图像是默认值:全部为红色。如何使色条在图像中显示正确的值范围,即1301-1500,并且图像的每个像素显示正确的值?
谢谢!
编辑: 答案:imagesc(B)