How to change scale of y-axes of an image displayed with imagesc?

16 ビュー (過去 30 日間)
Miguel
Miguel 2024 年 3 月 28 日 21:46
コメント済み: Miguel 2024 年 4 月 12 日 1:39
Hi everyone,
I have spent a lot of time trying to change the scale of the y-axes of the image shown below from 0-200 (pixels) to 0-45 (mm). Can any of you help me figure this out? To display the image, I am using imagesc.
Thank you so much for your help!

採用された回答

DGM
DGM 2024 年 3 月 28 日 21:54
imagesc() supports the specification of the x and y ranges. I don't know what your x range should be, but since this example image is square, I'm using the same for both x and y.
inpict = imread('cameraman.tif');
imagesc([0 45],[0 45],inpict)
  1 件のコメント
Miguel
Miguel 2024 年 4 月 12 日 1:39
That worked perfect! It was so simple. Thank you!

サインインしてコメントする。

その他の回答 (0 件)

タグ

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by