a problem using the roots function

hello… I couldn't use the roots function...does anyone have an idea what the problem is?

1 个评论

@Eliraz Nahum: please show us the complete output of this command:
which roots -all

请先登录,再进行评论。

 采纳的回答

Matt J
Matt J 2018-9-21
编辑:Matt J 2018-9-21
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 个评论

... and the solution is to rename your version of roots.m to something else so it doesn't shadow the MATLAB roots function.

请先登录,再进行评论。

更多回答(1 个)

Eliraz Nahum
Eliraz Nahum 2018-9-22
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.

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

产品

版本

R2018a

标签

Community Treasure Hunt

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

Start Hunting!

Translated by