matlab - Using meshgrid to interpolate image's physical coordinates -
i new matlab , simulating physical phenomena requires physical coordinates of image. example can use following give dimensions of image. a = phantom(80,250) a(81:250,:) = []; for physical system, need spacing 2 between each pixel , object go 0:2:280 in x , 0:2:410 in y. trying use meshgrid see if case starting [x,y] = meshgrid(1:1:100, 1:1:300); [xm,ym] = meshgrid(1:.5:300, 1:.5:450); m = interp2(x,y,a,xm,ym,'nearest'); this not give me want how think can potentially achieve solution. my basic problem have image size (80,250) , need sample/scale can correlate point on top right location (280mm,410mm) sample of 2mm between each pixel. right approach or should use function? first of all, image not 80 x 250. sure go checkout documentation . what hoping after step? determines whether appropriate way go this. but based on code , last statement, want x range 0 - 280 , y range 0 - 410. xrange = linspace(0, 280, size(a, 2)); yrange = linspace(0, 410, siz...