Strange "solve" error and undefined "vpasolve"

7 visualizaciones (últimos 30 días)
Philip Croné
Philip Croné el 3 de Nov. de 2018
Comentada: Walter Roberson el 22 de Abr. de 2025
Hi,
When trying to use the "solve" function for one of the doc examples it only returns the sym variable. It doesn't even solve the equation x+1==0, when using the syntax:
syms x
solvex=solve(x+1==0,x)
it only returns solvex=x. Even worse, it does not even recognize vpasolve as a function and gives the error: "Undefined function or variable 'vpasolve'". Any help would be greatly appreciated.
/Philip
  2 comentarios
Walter Roberson
Walter Roberson el 3 de Nov. de 2018
Is it possible that at some point you installed the Maplesoft MATLAB Connector, which is an interface that permits MATLAB to call into Maple ?
Philip Croné
Philip Croné el 4 de Nov. de 2018
Yes, I would say that's highly possible!

Iniciar sesión para comentar.

Respuesta aceptada

Star Strider
Star Strider el 3 de Nov. de 2018
This may be a path problem.
Try typing these either in your Command Window or a script:
restoredefaultpath
rehash toolboxcache
If that does not solve your problem, request Tech Support through the Contact Us link at the top right corner of this page.
  4 comentarios
Francisco Lopes
Francisco Lopes el 26 de En. de 2023
Editada: Francisco Lopes el 26 de En. de 2023
I solved this kind of problem using:
syms z
before the solver command.
Ex.:
syms z
Sol = solve(fA == 0, fB == 0);
Justifying: Matlab needs treat z symbolic in order to handle the different solutions.
Star Strider
Star Strider el 26 de En. de 2023
@Francisco Lopes — That wasn’t actually the original problem.

Iniciar sesión para comentar.

Más respuestas (1)

MohammadMahdi MovahedFar
MohammadMahdi MovahedFar el 22 de Abr. de 2025
Editada: MohammadMahdi MovahedFar el 22 de Abr. de 2025

You should write:

S = vpasolve(...)

Without assignment it won't work.

  2 comentarios
Star Strider
Star Strider el 22 de Abr. de 2025
Proof —
syms x
vpasolve(x+1==0,x)
ans = 
.
Walter Roberson
Walter Roberson el 22 de Abr. de 2025
The original problem was that the user had installed the Maplesoft Maple symbolic interface, which does not define a function named vpasolve . Requiring output for an undefined function does not fix the problem that the function is undefined.

Iniciar sesión para comentar.

Categorías

Más información sobre Symbolic Math Toolbox 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