issues with syms function

조회 수: 4 (최근 30일)
Reem Alblooshi
Reem Alblooshi 2020년 10월 8일
댓글: GAGANDEEP KAUR 2020년 10월 27일
Whenever I use the syms (symbolic function) code I keep getting errors, even on simple codes that I am sure they are correct.
For example this simple code
syms a [1 4]
a
The output
Error in syms (line 227)
defined = sym(zeros(1, length(args)));
Error in quiz (line 1)
syms a [1 4]
  댓글 수: 9
Walter Roberson
Walter Roberson 2020년 10월 27일
restoredefaultpath
rehash toolboxcache
syms x
and see if that works.
I suspect you have a third-party function that is interfering with operation the Mathworks sym.m
GAGANDEEP KAUR
GAGANDEEP KAUR 2020년 10월 27일
I have tried as you adviced but still it is keep on running. If possible may you please have a look at attcahed files

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

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 10월 10일
Most likely scenario is that you somehow overwrote the sym.m file. The only way to fix it is to delete the current installation and reinstall MATLAB.
  댓글 수: 2
Reem Alblooshi
Reem Alblooshi 2020년 10월 11일
yes I did that and the programs is working now, thank you for your assistance.
Ameer Hamza
Ameer Hamza 2020년 10월 11일
I am glad to be of help!

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

추가 답변 (1개)

madhan ravi
madhan ravi 2020년 10월 8일
You have a custom file named sym.m , remove it from the path or rename it.
  댓글 수: 1
Reem Alblooshi
Reem Alblooshi 2020년 10월 10일
I tried deleting the file but I keep getting this messsage
Warning: File 'sym.m' not found.
> In quiz (line 2)
although the file does exist.

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

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by