Error: Not Enough Input Arguments

18 Ansichten (letzte 30 Tage)
Bilal Antaki
Bilal Antaki am 29 Nov. 2020
Kommentiert: KALYAN ACHARJYA am 29 Nov. 2020
Im not that experinced in matlab yet, and Im facing a problem. When I write roots command like that:
roots([3 -2 -4])
or
p = [3 -2 -4];
roots(p)
Whenever I run the program I get the following:
Not enough input arguments.
Error in roots (line 2)
Delta = b^2 - 4*a*c ;
Error in Untitled3 (line 1)
roots([3 -2 -4])

Akzeptierte Antwort

KALYAN ACHARJYA
KALYAN ACHARJYA am 29 Nov. 2020
Bearbeitet: KALYAN ACHARJYA am 29 Nov. 2020
Once, I tried to reproduce the same error, I could not
>> p = [3 -2 -4];
roots(p)
ans =
1.5352
-0.8685
One Suspect: Is there any other file name as roots.m in the same working directory?
  2 Kommentare
Bilal Antaki
Bilal Antaki am 29 Nov. 2020
Oh yeah .. I had a function called roots. It is probably why the command was not working.
Thanks alot!
KALYAN ACHARJYA
KALYAN ACHARJYA am 29 Nov. 2020
It's my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Polynomials finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by