Strange "solve" error and undefined "vpasolve"

조회 수: 7 (최근 30일)
Philip Croné
Philip Croné 2018년 11월 3일
댓글: Walter Roberson 2025년 4월 22일
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
Walter Roberson
Walter Roberson 2018년 11월 3일
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é 2018년 11월 4일
Yes, I would say that's highly possible!

댓글을 달려면 로그인하십시오.

채택된 답변

Star Strider
Star Strider 2018년 11월 3일
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
Francisco Lopes
Francisco Lopes 2023년 1월 26일
편집: Francisco Lopes 2023년 1월 26일
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 2023년 1월 26일
@Francisco Lopes — That wasn’t actually the original problem.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

MohammadMahdi MovahedFar
MohammadMahdi MovahedFar 2025년 4월 22일
편집: MohammadMahdi MovahedFar 2025년 4월 22일

You should write:

S = vpasolve(...)

Without assignment it won't work.

  댓글 수: 2
Star Strider
Star Strider 2025년 4월 22일
Proof —
syms x
vpasolve(x+1==0,x)
ans = 
.
Walter Roberson
Walter Roberson 2025년 4월 22일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by