I want find the reason for this error message.
조회 수: 2 (최근 30일)
이전 댓글 표시
I am having trouble finding the reason behind this error message. I chechked my function again and again. but do not know why it is happening.
Error: Not enough input arguments.
Error in fl (line 7)
x=round(x*10^(p-deci))*10^(deci-p);
Function:
%%round number x to normalized p-digit form
%%x=fl(x,p)
function x=fl(x,p)
format long
if x~=0
deci=ceil(log10(abs(x)));
x=round(x*10^(p-deci))*10^(deci-p);
end
Script:
a1=1/3; a2=1.002;
b1=(123/4)^2; b2=11.01^2;
c1=1/6 ; c2=0.01265;
d1=fl(-b1,4);
e1=fl(fl(d1+fl(sqrt(fl(fl(b1,3)-fl(fl(4*a1,3)*c1,3),3)),3)))
댓글 수: 0
채택된 답변
the cyclist
2021년 8월 30일
In the outermost call to fl in this line
e1=fl(fl(d1+fl(sqrt(fl(fl(b1,3)-fl(fl(4*a1,3)*c1,3),3)),3)))
you are calling with only one input argument. And if I am looking at the parentheses correctly, the same is true of at least one other call to fl.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!