フィルターのクリア

How do I replace the axes in an image?

4 ビュー (過去 30 日間)
ijsonvjksrefdsb
ijsonvjksrefdsb 2023 年 7 月 17 日
回答済み: DGM 2023 年 7 月 18 日
I have an image where the y axis is the frequency and the x axis is time. The color of the pixels in the image shows the intensity. When i use the image function, the indices of frequency vs. time (examples, 802x14000) is what's on the axes. If I have a set of values for frequency (25-180MHz) and time, how do I replace the indices in the image with the actual values?

採用された回答

DGM
DGM 2023 年 7 月 18 日
You can specify the x and y extents of the image object.
xdata = 10:20;
ydata = 0:0.1:0.5;
inpict = imread('cameraman.tif');
image(xdata,ydata,inpict)
If you want your yaxis flipped the other way, you'll have to do some combination of
inpict = flipud(inpict); % flipping the image prior to display
and/or
set(gca,'ydir','normal') % flip the axes

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by