From: H on
I also came up with another pretty fast solution, but it's quite messy

If I take the number of nodes I have and for a 3-d matrix with the dimensions i want. Example:
A=reshape(1:N,w,d,h);

I can quickly get the node number of a coordinate by X(2,5,6) for example. This is however quite disorientating because the coordinates are offset by (1,1,1) because the matrix indexing starts at (1,1,1). There's also a problem if I want to go another way and get a coordinate of node number 523 for example because the find-command doesn't give the z-coordinate, only x y...