Troubleshooting Missing MATLAB Toolbox Functions

  • Thread starter Thread starter mikeph
  • Start date Start date
  • Tags Tags
    Function
AI Thread Summary
The discussion revolves around an issue with the MATLAB function fanbeam.m, where the user encounters an error when trying to execute an example from the help file. The user suspects a conflict due to a previously created m-file with the same name. Suggestions include using the "which fanbeam" command to check if the function is missing from the path or if another file is taking precedence. The user discovers that a different fanbeam.m file located in the MATLAB folder was causing the conflict. After renaming this file, the function works correctly.
mikeph
Messages
1,229
Reaction score
18
I'm trying to use the fanbeam.m function for some experimenting and when I select the example in the help file and press F9, I'm getting an error on the line where it uses the function.

I type "help fanbeam" and get No help found for fanbeam.m.

I may have written an m-file called this in the past, it's the only reason I can think it wouldn't work, but this file is not in my workspace at the moment.

Any ideas why this MATLAB toolbox function is missing/lost?

Thanks
 
Physics news on Phys.org
What does Matlab say when you type "which fanbeam"? If you don't get anything, it means the function is missing from the path. If that's the case, then either the m file is missing, or the path is missing the proper folder. If you get a path, and it's not the toolbox path, then you have another fanbeam.m file which takes precedence.
 
caffenta said:
What does Matlab say when you type "which fanbeam"? If you don't get anything, it means the function is missing from the path. If that's the case, then either the m file is missing, or the path is missing the proper folder. If you get a path, and it's not the toolbox path, then you have another fanbeam.m file which takes precedence.

It's in the MATLAB folder! I guess it takes precedence, did not realize it would look outside of the workspace!

Renamed it and it's working perfectly now! Thanks.
 

Similar threads

Replies
5
Views
2K
Replies
1
Views
8K
Replies
1
Views
2K
Replies
7
Views
8K
Replies
2
Views
1K
Back
Top