Clear Filters
Clear Filters

a problem using the roots function

1 view (last 30 days)
hello… I couldn't use the roots function...does anyone have an idea what the problem is?
  1 Comment
Stephen23
Stephen23 on 21 Sep 2018
@Eliraz Nahum: please show us the complete output of this command:
which roots -all

Sign in to comment.

Accepted Answer

Matt J
Matt J on 21 Sep 2018
Edited: Matt J on 21 Sep 2018
Yes, you have another file named roots.m at the location shown in the error message. Matlab thinks you are trying to execute that one.
  1 Comment
James Tursa
James Tursa on 21 Sep 2018
... and the solution is to rename your version of roots.m to something else so it doesn't shadow the MATLAB roots function.

Sign in to comment.

More Answers (1)

Eliraz Nahum
Eliraz Nahum on 22 Sep 2018
Thanks everyone for replying. The problem was indeed existence of another file with a name "roots".
by the way, is there any recommendation to where I save and run my files? as for now, I do it on a local folder on my desktop. if there is any problem with that, please let me know.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Tags

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!