How to used linspace matlab function to get the and the y of all pixels in image?
<p>I have an image of 200x200 * 3, and I should to find the x and the y of each pixel of the image by using the linspace Matlab function.
I have already used the mesh grid function with the following code:</p>

<pre><code>Ny=200; % # pixels in y direction 
Nx=200; % # pixels in x direction 
resolution=1; % size of a pixel 
img=rand(Ny,Nx,3); % random image 
y=(img(1:Ny))*resolution-resolution/2; 
x=(img(1:Nx))*resolution-resolution/2; 
[x,y]=meshgrid(x,y); 
</code></pre>

<p>But my supervisor told me to use the function linspace and I cannot understand how.Can someone help me please</p>