Info

此问题已关闭。 请重新打开它进行编辑或回答。

Why am I getting "Requested 4000000000x1 (29.8GB) array exceeds maximum array size preference...." with my code that I am trying to run? I'm using the error function but I don't see why a normal machine can't run this.

1 次查看(过去 30 天)
This is the code I am trying to run when I get the message:
if true
a = 1
b = 3*10^-7
c = 5*10^-8
f = 4*10^9
sigma = 0.2
t0 = 0
tmax = 2*b
F = -2*pi*f*(pi*c^2*f + sqrt(-1)*b)
D = real([(b-sqrt(-1)*2*pi*c^2*f - t0)/(sqrt(2)*c)])
E = real([(b-sqrt(-1)*2*pi*c^2*f - tmax)/(sqrt(2)*c)])
F(f) = sqrt(pi/2)*a*c*exp(F)*[erf(D)-erf(E)]
% code
end
This equation is going to go into another equation that uses F(f) to get the final answer using all of the same stated variables in the code. Is there a way I can execute this without having it make the array such a large size that it is not able to be processed on most computers?

回答(0 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by