I'm having the same problem here. In my case, functions don't run when they are part of a class folder (i.e. starting with '@'). So I have the strange behaviour:
>> which -all ttm /home/rafa/tensor_toolbox/@ttensor/ttm.m % ttensor method /home/rafa/tensor_toolbox/@tensor/ttm.m % tensor method /home/rafa/tensor_toolbox/@sptensor/ttm.m % sptensor method /home/rafa/tensor_toolbox/@ktensor/ttm.m % ktensor method >> ttm Undefined function or variable 'ttm'.
('ttm' is a perfectly valid file from a widely-used toolbox, it used to work until it randomly broke, and the '/home/rafa/tensor_toolbox/' folder belongs to the path, as it should be)
In general, a lot of confusion seems to exist around these 'undefined' error issues. Anyone has any clue?
Walter Roberson <email@example.com> wrote in message <firstname.lastname@example.org>... > us wrote: > > "teki " <email@example.com> wrote in message > > <firstname.lastname@example.org>... > >> Hi Shan, > >> > >> 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! > >> > >> Sundeep > > > > it looks like you might have a broken hd... > > Or a corrupted Matlab installation. > > I'd probably start by removing the matlab preferences file.