imagesc interpolating axes with matching grids?

1 回表示 (過去 30 日間)
MikeStein
MikeStein 2014 年 6 月 29 日
編集済み: MikeStein 2014 年 6 月 29 日
Hello,
In the code below, I generate an x/y position vector and an associated 2D array with corresponding sampling. In other words, N = size(x) == size(y) == size(array,1) == size(array,2)
the N/2+1 grid point on x and y are position 0. However, when using imagesc and N >= 512 it seems as though imagesc interpolates these x and y vectors. Using the datatips, you can display the associated x,y,z information for each point plotted. The center point is small, but not exactly zero. I have no explanation for this behavior. Thoughts?
I am using 2013a, fyi.
format 'long'
N = 512; % for 510 and lower, no issue
delta = pi; % Note that if delta = 1, no issue
x = ((-N/2):(N/2-1))*delta;
test = zeros(N);
test(N/2+1,N/2+1) = 1; % Poke center pixel
figure
imagesc(x,x,test)

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by