The syms function will not work?

I'm having an issue with the syms command. It used to operate but now I keep getting the following error: Error using sym Error: File: sym.m Line: 209 Column: 10 Illegal use of reserved keyword "if".
Error in syms (line 77) toDefine = sym(zeros(1, 0));
I'm told that at some point, the code for this function was altered. I tried to fix the code but I think I made the issue worse. Can you please provide me with the proper code? If not, is there any other way to fix this issue?

3 Comments

How can we fix a code we do not have?
madhan ravi
madhan ravi on 6 Oct 2018
Edited: madhan ravi on 6 Oct 2018
Upload sym.m file and your script file where you use it.
Sounds like your sym.m might be corrupt. Perhaps you were debugging and had it show up with an error message and then you accidentally typed into it and it accidentally got saved.

Sign in to comment.

Answers (0)

Tags

Asked:

on 6 Oct 2018

Commented:

on 7 Oct 2018

Community Treasure Hunt

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

Start Hunting!