I want find the reason for this error message.

2 ビュー (過去 30 日間)
Matthew Worker
Matthew Worker 2021 年 8 月 30 日
コメント済み: N/A 2021 年 9 月 2 日
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)))

採用された回答

the cyclist
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.
  1 件のコメント
N/A
N/A 2021 年 9 月 2 日
Thank you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by