Error using repmat Requested 96761x96761 (69.8GB) array exceeds maximum array size preference (15.8GB). This might cause MATLAB to become unresponsive.

10 次查看(过去 30 天)
load 'X_Coordinates.txt'
load 'Y_Coordinates.txt'
load 'dsp_real.txt'
load 'dsp_imag.txt'
complex_z= complex(dsp_real, dsp_imag);
% disp(complex_z);
Z=complex_z(:,280);
X=meshgrid(X_Coordinates);
Y=meshgrid(Y_Coordinates);
Z=meshgrid(Z);
surf(X,Y,Z)

回答(1 个)

Dinesh
Dinesh 2023-9-22
Hi Sashi Kumar,
I understand that you are attempting to create meshgrids for 'X_Coordinates', 'Y_Coordinates', and 'Z', and then use them to plot a surface plot. However, you are encountering an error stating 'Array exceeds the maximum array size preference.' This error occurs when the requested array is larger than what MATLAB can handle. In this case, the meshgrid operation is internally calling the repmat function, resulting in an array with dimensions of '96761 * 96761', which requires a significant amount of RAM to create.
To resolve this issue, you can divide the problem into smaller subproblems to avoid running into memory limitations. By breaking down the task into manageable chunks, you can overcome this problem.
For more detailed information on how to divide the problem into subproblems and explore alternative approaches to tackle this issue, I recommend referring to the following MATLAB Answers thread:
If you are still experiencing issues it would be helpful to have more details about the data you are working with
Hope this helps.
Best Regards,
Dinesh Reddy Gatla.

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by