Error: Not Enough Input Arguments

조회 수: 18 (최근 30일)
Bilal Antaki
Bilal Antaki 2020년 11월 29일
댓글: KALYAN ACHARJYA 2020년 11월 29일
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])

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 11월 29일
편집: KALYAN ACHARJYA 2020년 11월 29일
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
Bilal Antaki
Bilal Antaki 2020년 11월 29일
Oh yeah .. I had a function called roots. It is probably why the command was not working.
Thanks alot!
KALYAN ACHARJYA
KALYAN ACHARJYA 2020년 11월 29일
It's my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by