Thank you very much for your applaudable efforts. I have just give an example for 2-dimensional case but i need to generalize it to n-dimensional case. Therefore "meshgrid" is not work for n>=4. But now i find a better way in order to obtain such matrix.
Professor, thank you very much. "meshgrid" is useful for n=2 and n=3 but not work for n>=4. But now i find a better way in order to obtain such matrix.