Input Arguments of Type Double
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
This is my function
function[x] = fixedpt(xin,tol)
xold=xin;x=g(xin),
while abs(x-xold)>tol,xold=x;x=g(xold), end
end
When I try to use it I get the error
Undefined function 'g' for input arguments of type 'double'.
Error in fixedpt (line 2)
xold=xin;x=g(xin),
How can I fix this?
0 commentaires
Réponses (2)
Matt J
le 8 Mai 2013
You need to define g (a function? a vector?) so that MATLAB knows what it is.
2 commentaires
Matt J
le 8 Mai 2013
Jamie Commented:
All I know is that it is a .m file, the code was written by my lecturer and I was just supposed to be using it, I have no idea how the code works.
We were told to download it to matlab then plug in our numbers.
Voir également
Catégories
En savoir plus sur Downloads dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!