imagesc interpolating axes with matching grids?

1 vue (au cours des 30 derniers jours)
MikeStein
MikeStein le 29 Juin 2014
Modifié(e) : MikeStein le 29 Juin 2014
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)

Réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by