Error in using syms

Hello.
I have a problem with syms. My MATLAB R2020b doesn't respond my syms commands. Please help me.
For example;
syms x
e = x^2 -9
solve(e)
Results:
Error using sym
Too many input arguments.
Error in syms (line 227)
defined = sym(zeros(1, length(args)));
Error in Untitled31 (line 1)
syms x

6 Comments

What shows up for
which -all sym
I suspect that you have some other sym.m on your path.
Emin Kursat Dogray
Emin Kursat Dogray on 23 Dec 2020
Edited: Emin Kursat Dogray on 23 Dec 2020
Thanks for responding.
Warning: Function line has the same name as a MATLAB builtin. We suggest you rename the function to
avoid a potential name conflict.
>> Untitled91
D:\MATLAB\toolbox\symbolic\symbolic\@sym\sym.m % sym constructor
Please show some lines of the file D:\MATLAB\toolbox\symbolic\symbolic\@sym\sym.m
dbtype sym.m 1:5
1 classdef sym < handle 2 %SYM Construct symbolic numbers, variables and objects. 3 % S = SYM(A) constructs an object S, of class 'sym', from A. 4 % If the input argument is a string, the result is a symbolic number 5 % or variable. If the input argument is a numeric scalar or matrix,
dbtype sym.m 199:205
199 methods 200 function S = sym(x, n, a) 201 symengine; 202 if nargin ~= 0 203 if isstring(x) 204 if isscalar(x) 205 if ismissing(x)
And in the meanwhile, you should track down which line and see why you have it; you could have a lot of graphics problems if you have your own line.m .
Emin Kursat Dogray
Emin Kursat Dogray on 23 Dec 2020
Edited: Emin Kursat Dogray on 23 Dec 2020
>> Untitled13
1 function elimination
2 n=10;
3
4
5 for i1=1:n
I think I accidentally overwritten the file I was working on. How can I fix?
If you overwrote sym.m then unless you have a backup, you will need to reinstall the Symbolic toolbox

Sign in to comment.

Answers (0)

Asked:

on 23 Dec 2020

Commented:

on 23 Dec 2020

Community Treasure Hunt

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

Start Hunting!