MATLAB: Create a 2D grid from two matrices.

2dgridmatricesmesh

I need to create a 2D mesh like the following:
I have a matrix (8×10 digits) with the x-values and a matrix of the corresponding y-values but am unsure how to go about making such a figure. Please note that this is not a surface rather just an irregular 2D grid.
Any help is appreciated!

Best Answer

As you said you have 8X10 matrices of x and y. Use the function plotgrid from the link: