imagesc interpolating axes with matching grids?
1 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!