Errors when using syms function
18 views (last 30 days)
Show older comments
Alexander Hopkins
on 15 Nov 2015
Commented: Alexander Hopkins
on 15 Nov 2015
When I try to use the syms function, I receive an several errors.
Simple code to show what I'm working with:
syms x y z
eq1 = sym('x = y*z')
The errors I receive:
Error using zeros
Too many output arguments.
Error in syms (line 77)
toDefine = sym(zeros(1, 0));
Error in testrunforerrors (line 1)
syms x y z
I tried uninstalling Matlab from my computer and reinstalling, but that didn't help. Not sure if it's related or not, but when I start up Matlab, the past several times, I've recieved the error code:
Error using connector.internal.autostart.run
Too many output arguments
0 Comments
Accepted Answer
Walter Roberson
on 15 Nov 2015
Use
which -all zeros
The first one you see on the list will be a zeros.m that you yourself have added -- likely code to find the zeros of a function. That file is interfering with the use of zeros() as the standard MATLAB function to allocate an array that is filled with 0. You will need to delete your zeros.m or rename it to something that is not used as a common MATLAB routine name.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!