I tried running the file from both the command window and directly from the m-file but neither works. The function and variable names are not conflicting.
The same function works fine on my pc (with r2008a), but not on my laptop running matlab r2009a. Even a simple m-file to display a message won't run on my laptop now.
On some other pages, someone suggested it might be a problem with the pathdef.m file, but I am not sure...I even added the path of the current directory before running the m-file, but to no avail!
"Shanmugam Kannappan" <email@example.com> wrote in message <firstname.lastname@example.org>... > Hi, > > May I know how you are trying to run the file? > I mean,r u running in the command window or directly from the m-file. > Also,please check your function name's & variables names are not the same. > > Shan! > > > "teki " <email@example.com> wrote in message <firstname.lastname@example.org>... > > Hi, > > > > I am facing the same problem today. > > > > I try to run the .m file in my current directory and Matlab would give the message - "Undefined function or variable". I add the current path and still it does not recognize any .m file in the current directory. > > > > Moreover, any new .m file is not running at all, while some of the old .m files I executed previously are working fine. > > > > Any help is most appreciated! > > > > Many thanks, > > Sundeep > > > > "Steven Lord" <email@example.com> wrote in message <firstname.lastname@example.org>... > > > > > > "Theophane " <email@example.com> wrote in message > > > news:firstname.lastname@example.org... > > > > Matlab has gone mad! It won't accept any declaration other than > > > > predeclared matlab functions (say, fft). Almost any other function call > > > > returns 'Undefined function or method bla bla'. > > > > > > > > I know you'll think that I don't have the path defined correctly, or that > > > > my function is not defined properly, but this is not the case. I am trying > > > > to call functions or script located in the directory i am currently > > > > browsing. > > > > > > > > Tab autocompletes their name when I start typing the first few letters. > > > > But as soon as I press enter, matlab gets confused. I have been using > > > > matlab for years, never encountered this problem. > > > > > > > > Even weirder, I can copy those files in a different folder, and sometimes, > > > > just sometimes, they will work. For a bit. Before becoming un-callable > > > > again. > > > > This does not concern all the files I am using, just some. they can be on > > > > a different drive, too. > > > > > > > > Does anyone have any clue what is going on? > > > > > > Send a listing of the names of the files in that directory to Technical > > > Support so they can investigate what's going on. > > > > > > -- > > > Steve Lord > > > email@example.com > > > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > > > To contact Technical Support use the Contact Us link on > > > http://www.mathworks.com > >