Trying to use Symbolic engine - Mupad or Maple
4 次查看(过去 30 天)
显示 更早的评论
Hello,
I had used the Maple symbolic engine in matlab version 2007b and 2010b. However in R2012a, code such as:
M = maple('GenerateMatrix', eqset, gunkset, 'augmented=true', 'outputoptions=[storage=sparse]');
which uses strictly Maple functions no longer works, since there appears to be no way to change the symbolic engine from Mupad to Maple.
First, is it possible to change the symbolic engine to Maple in R2012a ?
Second, I tried using Mupad to do the same calculations: I tried the following as a test, on the command line:
syms x y
eqs = [2*x + y - 1, x + y - 2];
unks = [x, y];
s = feval(symengine, 'linsolve', eqs, unks);
I get the following error:
??? Error using ==> mupadengine.mupadengine>mupadengine.feval at 141 Error: expecting set or list of equations [linsolve]
I'm simply not able to figure out what is going wrong. (The mupadengine.m file appears to convert the arguments into some internal form represented by the identifier _symans_32_8 and so on).
Note that if I write:
s = feval(symengine, 'linsolve', '[2*x + y - 1, x + y - 2]', '[x, y]');
then there is no error and the equation is solved successfully. However, in my particular application, the equations are generated on the fly. Moreover, obtaining a matrix A (to solve Ax = b) is very inconvenient. The Maple function 'GenerateMatrix' (see above), did the needful when the Maple engine was available but I don't see any equivalent in Mupad.
I also tried:
s = feval(symengine, 'linsolve', char(eqs), char(unks));
but the error remains.
Would be grateful if anyone has any comments.
Best Regards,
Sandeep.
6 个评论
zhang sifei
2019-11-9
编辑:zhang sifei
2019-11-9
Dear Walter Roberson,
Thank you very much. May peace and love fill your heart, and contentment and joy fill your days.
Best regards,
Zhang Sifei.
zhang sifei
2019-11-26
Dear Walter Roberson,
could you help me how to solve this problem?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/250368/image.png)
The wrong code is
T(i,1)=T(i,1)+w*(u(j,1)-u(i,1))*v*f;
and the sym/subsasgn (line 64) is
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/250369/image.png)
The original question is
回答(2 个)
Walter Roberson
2012-7-20
I do not recall the exact release at the moment, but symengine can no longer be changed.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!