I want find the reason for this error message.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Matthew Worker
el 30 de Ag. de 2021
Comentada: N/A
el 2 de Sept. de 2021
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 comentarios
Respuesta aceptada
the cyclist
el 30 de Ag. de 2021
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!