imagesc interpolating axes with matching grids?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!