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)))

采纳的回答

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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by