MATLAB: Create a mesh from a matrix

mesh

Hi everyone, I think this question will be really easy for a lot of people here, but this is the first time I need to mesh something and I am lost.
I have a matrix n*n with value 1 and 0 only. I would like to find a mesh for this matrix. I don't want to plot anything ! All the 'mesh tools' I found are just plotting curves in different way. I want vectors/matrix as output, with the coordinates of every nodes.
Could you help me and tell me which function I can use for that ?
Thank a lot.

Best Answer

A "node" is simply a matrix location containing a 1? If so, use the FIND command (with 2 output args).