Maximum variable size allowed by the program is exceeded.

6 visualizaciones (últimos 30 días)
Hi my code is below
clc
format long g
a=588545.909;
b=10167.688;
c=150;
ox=302;
oy=192;
for oz= 1800:1:2313
oev=a.*ox+b.*oy+c.*oz ;
oce=oev+500000;
less=round(oce.*0.9,3);
x1=250:.001:1550;
y2=150:.001:1450;
z3=1200:.001:2500;
x=perms(x1)
y=perms(x1)
z=perms(x1)
then the error come
Maximum variable size allowed by the program is exceeded for x=perms(x1)
need to overcome the error. How can I?

Respuesta aceptada

Steven Lord
Steven Lord el 10 de Abr. de 2020
You can't.
The output of perms(x) has factorial(n) rows, where n is the number of elements in x. How big is that?
>> x1=250:.001:1550;
>> vpa(factorial(sym(numel(x1))))
ans =
1.2633683274814429271576127065521e+7383553
The number of hydrogen atoms in the observable universe is estimated to be around 1e80.
  5 comentarios
Steven Lord
Steven Lord el 11 de Abr. de 2020
If you multiply both sides of the equation by 1000 (so x, y, and z are integers) you may be able to use some of the techniques for Diophantine equations to obtain your solutions.
MD.MASHRAVI SHAMS
MD.MASHRAVI SHAMS el 11 de Abr. de 2020
dear steven, i have write another code for Diophantine equation. but it runs for last 7 hrs
a=588545.909;
b=10167.688;
c=150;
x=250:.001:1550;
y=150:.001:1450;
z=1200:.001:2500;
o=(a.*x+b.*y+c.*z);
t=o+500000==162486009.553;
[xSol, ySol, zsol] = solve(t,[x y z])
is there any wrong in this code?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by