Error in solve/mupadengine processing complex numbers

6 vues (au cours des 30 derniers jours)
Alex Wylie
Alex Wylie le 15 Fév 2017
Commenté : Walter Roberson le 16 Fév 2017
Hi,
So I've written a code to solve 4 equations which are shown below. The equations consist of hyperbolic and normal trigonometric functions, exponentials and complex numbers. I tried two numerical solvers, solve and vpasolve. Both programs got stuck and ran infinitely until I terminated the operations and recieved the error messages shown below. The first one is for solve and the second one is for vpasolve. I'm using MATLAB_R2016a.
SOLVE
Operation terminated by user during mupadengine/evalin (line 102)
In mupadengine/feval (line 158)
[S,err] = evalin(engine,stmt,'message');
In solve (line 292)
sol = eng.feval('solve', eqns, vars, solveOptions);
In boneys (line 110)
[a_i, b_i, c_i, d_i] = solve(EQ_1, EQ_2, EQ_3, EQ_4, a_i, b_i, c_i,
d_i);
end
VPASOLVE
Operation terminated by user during mupadengine/evalin (line 102)
In mupadengine/feval (line 158)
[S,err] = evalin(engine,stmt,'message');
In sym/vpasolve (line 172)
sol = eng.feval('symobj::vpasolve',eqns,vars,X0);
In boneys (line 110)
[a_i, b_i, c_i, d_i] = vpasolve([EQ_1, EQ_2, EQ_3, EQ_4], [a_i, b_i,
c_i, d_i]);
Thanks,
Alex.

Réponses (1)

Walter Roberson
Walter Roberson le 15 Fév 2017
You did not include the equations.
Nonlinear equations can take very long to complete and can require a lot of memory. It is not uncommon at all to encounter nonlinear systems that exceed the practical capacity of an 8 gigabyte system when using solve. vpasolve is less likely to run out of memory for the same size of system but can still take very long times.
Sometimes mathematical transformation can speed up the calculations a lot, but only sometimes.
  2 commentaires
Alex Wylie
Alex Wylie le 16 Fév 2017
It always failed on the same lines for both. No matter how long I waited, if I left it 10 minutes and cancelled and if I left it 10 hours and cancelled it would have the same error so it was obviously not processing.
Walter Roberson
Walter Roberson le 16 Fév 2017
You still did not include the equations.
The symbolic solver calls into a compiled library that the line numbers are not available for. No matter where you are in that compiled library, when you control-C you would always be given the same line numbers, which would be the line number of the place that made the call into the compiled library.
Suppose, for example, that you tried to invert a 5 million by 5 million numeric matrix, and it was taking a long time. But every time you interrupted, it would show the same line number, the inv() call. That would not mean that inv() was "stuck" at some place, it would just mean that there was no ability to trace lines into the compiled code that implements inv()

Connectez-vous pour commenter.

Catégories

En savoir plus sur Parallel Computing Toolbox dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by