MATLAB: How to create list of points from meshgrid output

gridlistpoints

I need a grid, but not is the meshgrid matrix format. How to convert it to list of points like [x1 y1; x2 y2; x3 y3; …]

Best Answer

[x, y] = meshgrid(1:5, 1:7);
points = [x(:), y(:)]
Related Question