syms does not work on my matlab

9 次查看(过去 30 天)
I have installed Symbolic Math Toolbox and Simulink for my Matlab but when I try to use syms on my program it doesn't work.
"Execution of script syms as a function is not supported:" shows up
At first I thought I installed it wrong but sym works perfectly fine....
Only syms doesn't work....
What is the problem?

采纳的回答

John D'Errico
John D'Errico 2022-9-8
编辑:John D'Errico 2022-9-8
Is there a reason why you decided to name a script syms, and then tried to use syms itself? What you did was confuse MATLAB, so that now, when it tried to use the real syms command/function, it sees your script FIRST.
DO NOT NAME YOU OWN FUNCTIONS OR SCRIPTS WITH NAMES THAT ALREADY EXIST. If you do that, then do you see what happens?
To fix this, rename the script you created.
  8 个评论
John
John 2024-1-10
LOL. I just ran into the same problem, named a script with syms.
John D'Errico
John D'Errico 2024-1-11
This is perhap one of the ways new users to MATLAB most frequently aground. And then they get a strange error, because MATLAB becomes completely confused. It has no idea what went wrong. The solution is to get used to the idea of not naming your scripts of functions with names already in use. It becomes a habit that you learn, avoiding that. And from then on, the problem goes away, at least for you.

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by