Effacer les filtres
Effacer les filtres

Undefined function for input arguments of....

2 vues (au cours des 30 derniers jours)
MiauMiau
MiauMiau le 3 Fév 2013
When I want to run the following function:
function [x,y] = ueb(x,y)
if x == 0 && y == 0
disp('hello')
else
disp('bye')
end
with inputing ueb(1,0) I get the error message:
>> ueb(1,0)
Undefined function 'ueb' for input arguments of type 'double'.
and yes, I have set the path...so what is the reason and what can I do? Thanks
  3 commentaires
Cedric
Cedric le 3 Fév 2013
Modifié(e) : Cedric le 3 Fév 2013
Look at the help for which, it could tell you if/where MATLAB sees ueb
Cedric
Cedric le 3 Fév 2013
Ah, did you save this code in ueb.m ? It happens to me that I change a bit the function name and forget to rename the file ..

Connectez-vous pour commenter.

Réponses (2)

Shashank Prasanna
Shashank Prasanna le 3 Fév 2013
MiauMiau, all these seems to be like they are either path issues or variable-function name conflicts.
Do the following since this is a relatively new installation:
>> restoredefaultpath
>> rehash toolboxcache
>> savepath
>> clear all
%%Run your code below %%

Azzi Abdelmalek
Azzi Abdelmalek le 3 Fév 2013
Modifié(e) : Azzi Abdelmalek le 3 Fév 2013
create another function, for example
function [x,y] = beu(x,y)
if x == 0 && y == 0
disp('hello')
else
disp('bye')
end
save it as beu then check if you are getting the same problem.
>>beu(1,2)

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by