Error while trying to access a function

9 vues (au cours des 30 derniers jours)
Smith
Smith le 4 Juil 2011
I have a function in matlab. When I try to run the file I get an error which says "Input Argument undefined". Please anybody let me know what can be done with this.
Thanks in advance Smith.

Réponse acceptée

Titus Edelhofer
Titus Edelhofer le 4 Juil 2011
Hi,
this error comes if you call a function without the input argument. Say your function looks like
function y = myfun(x)
the function expects to be called like this, e.g.
y = myfun(42);
If you just call
y = myfun
you will get this error. Does this help?
Titus
  1 commentaire
Smith
Smith le 5 Juil 2011
Thanks to you Titus, it worked.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Programming 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!

Translated by