Borrar filtros
Borrar filtros

Trying to use Symbolic engine - Mupad or Maple

11 visualizaciones (últimos 30 días)
SK
SK el 20 de Jul. de 2012
Comentada: zhang sifei el 26 de Nov. de 2019
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 comentarios
zhang sifei
zhang sifei el 9 de Nov. de 2019
Editada: zhang sifei el 9 de Nov. de 2019
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
zhang sifei el 26 de Nov. de 2019
Dear Walter Roberson,
could you help me how to solve this problem?
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
The original question is

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 20 de Jul. de 2012
I do not recall the exact release at the moment, but symengine can no longer be changed.

SK
SK el 24 de Jul. de 2012
Does anyone know why the Mupad connection does not work ? Incidentally, 'solve' works with similar code, but not 'linsolve'.
Regards, Sandeep

Community Treasure Hunt

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

Start Hunting!

Translated by