Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 imshow 命令来显示图像。我想不出的是根据我的 x 和 y 值标记图像轴。我的代码如下:
[X,Y] = meshgrid(0:0.01:1,0:0.01:1); u = 5; v = 1; z = sin(2*pi*(u*X+v*Y)); imshow(z); axis on
当我使用“axis on”时,它显示 0 到 100。但我想要的是 0 到 1。
imshow您可以按如下方式指定 x 轴和 y 轴值:
imshow
imshow(z, 'XData', 0:.01:1, 'YData', 0:.01:1)
(然后你当然需要axis on在你的代码中)。
axis on