MATLAB Answers

issues with syms function

3 ビュー (過去 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 件のコメント

表示 6 件の古いコメント
GAGANDEEP KAUR
GAGANDEEP KAUR 2020 年 10 月 27 日
I also have some problem with using syms a b c d e , my program keeps on running and when I am pausing it, it is opening sym.m file.
Although first line of the file is
classdef sym< handle
If anyone can help?
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.

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by