Expression is too large for MATLAB to evaluate
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Gabriele Porcelli
el 6 de Mayo de 2020
Respondida: Walter Roberson
el 3 de Dic. de 2024 a las 7:49
Hello everybody, I have a 6x36 symbolic matrix and I wanted to make it a function handle with function matlabFunction. I need to do this because later on I need to evaluate this 6x36 matrix numerically and I've noticed that numerical substitution with function feval is much faster than function subs. Unluckily when I use matlabFunction with the matrix in input I obtain this errore code:
Error using symengine
Error: Expression is too large for MATLAB to evaluate.
Error in symengine
Error in sym/matlabFunction (line 190)
g = symengine('makeFhandle',varnames,body);
I've also tried to simplify the symbolic matrix with the opportune function but the result was the MATLAB crashed twitce. I'm open to other suggestion on how evaluate numerically a symbolic matrix.
0 comentarios
Respuestas (2)
BhaTTa
el 3 de Dic. de 2024 a las 3:49
1 comentario
Walter Roberson
el 3 de Dic. de 2024 a las 7:47
No, that answer says that piecewise() now exists as a Symbolic Toolbox function. It has nothing to do with "Expression is too long for MATLAB to evaluate"
Walter Roberson
el 3 de Dic. de 2024 a las 7:49
Unfortunately, the expression is simply too large for the Symbolic Toolbox to handle.
You will need to do something like taking children() several times, converting the children to function handles, and piecing together calls to the function handles with appropriate joining functions.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!