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

1 Kommentar

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

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Matt J
Matt J am 21 Sep. 2018
Bearbeitet: Matt J am 21 Sep. 2018

1 Stimme

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 Kommentar

James Tursa
James Tursa am 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.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Eliraz Nahum
Eliraz Nahum am 22 Sep. 2018

0 Stimmen

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.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2018a

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by