I have created a function laplace3d() which accepts a 3D array describing the boundary conditions and -Inf at the places of unknown. It then calculates these unknown using finite difference method. Now the problem is that I can have any sort of 3D figure which is described in term of say matrix X. X here is n*3 matrix which store (x,y,z) of n vertices which if connected forms the 3D figure. I wanna extract a 3D matrix similar to U4c as shown in the figure from this matrix X of n*3 dimensions. I can just pass this U4c to my laplace3d() to get an answer. Any idea how I can create that? Thanks.
