problem with mesh

  • Follow


i am doing a project where i need to process different images and plot the highest intensity points.

for that i defined x as the number of images (which are 250),y as 640(as the image is 640 by 480)and scan all the 480 pixels for a given y and note it as v(y,x)=the other coordinate of the pixel(one of them is y)

now,while plotting a mesh,when i use the following command,
mesh(v);
i get a mesh.

but in case i use the following command

[x]=meshgrid(1:1:250);
[y]=meshgrid(1:1:600);

z=v(x,y);


mesh(x,y,z);

but as soon as i write the third command,an error is displayed which says given value exceeds matrix dimensions.

Can u please tell me why im getting the error and how i could avoid it?

Thanks a lot
0
Reply varunnalam (7) 5/27/2011 11:49:05 AM

Hi Varun,

You should instead use something like this:

[X,Y] = meshgrid(1:250,1:600);
meshgrid(X,Y,v);

Best.
0
Reply sadik.hava (254) 5/28/2011 5:53:02 PM


1 Replies
35 Views

(page loaded in 0.072 seconds)

Similiar Articles:













7/9/2012 3:40:32 PM


Reply: