I want find the reason for this error message.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
the cyclist
le 30 Août 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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!