MATLAB: Do I obtain a “maximum matrix size exceeded” error when using MESHGRID in MATLAB 7.6 (R2008a)

MATLAB

I have two vectors of size 218531×1 each, and I am trying to execute MESHGRID to obtain a grid based on the elements of these two vectors
x = 1:218531;
y = 1:218531;
[XX,YY] = meshgrid(x,y);
I obtain the following error:
??? Maximum variable size allowed by the program is
exceeded.
Error in ==> meshgrid at 44
xx = xx(ones(ny, 1),:);

Best Answer

The size of the matrices 'xx' and 'yy' generated by the code above is 218531x218531. This size exceeds the maximum allowed size for a matrix in some combinations of MATLAB and Operating System, as described in technical note 1110
<http://www.mathworks.com/support/tech-notes/1100/1110.html>