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 CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by