MATLAB: How to declare [X,Y] for image image processing Hi, i would like to know how to declare a coordinate for an image? Best Answer Let image be of size mxnx3 or mxn depending on binary on rgb. You can define X,Y as follows.[X,Y]=meshgrid (1:m,1:n)The above is w.r.t the indices. If you have x axis and y axis values/ positions you can use meshgrid. Related SolutionsMATLAB: Convert two vectors (x and y) to a square matrix x = 0:0.01:6.28;y = sin(x);M = ones(size(x,2));x_int = 1:size(x,2);y_int = ceil(y * size(y,2)/(abs(min(y))+abs(max(y))) +... size(y,2)/(abs(min(y))+abs(max(y))));y_int(y_int>size(M,2)) = y_int(y_int>size(M,2))-1;for k = 1:size(y,2) M(y_int(k),x_int(k)) = 0;endimshow(M) MATLAB: Z=xy perhaps you means an element-wise multiplication?z = x.*y;what you're doing above is a matrix multiplication from linear algebra. Related QuestionHow can i get RGB value if i have position(x,y)Mercator map projection from [X,Y] with known lat/lon coordinates
Best Answer