Why does the command "edit <filename>" return the error "Unable to edit '<filename>'. Editing namespace folders using the EDIT function is not supported"?

I want to edit the file "<MATLAB path>/toolbox/wavelet/core/wavelet/@cwtfilterbank/wt.m" using the "edit" command. However, the command 
edit wt
gives the error
Error using edit (line 69)
Unable to edit 'wt'. Editing namespace folders using the EDIT function is not supported.
However, "<MATLAB path>/toolbox/wavelet/core/wavelet/@cwtfilterbank/wt.m" is not a namespace folder. Why am I receiving this error and how do I edit my desired file?

 Accepted Answer

In this particular case, the command "edit wt" finds the path "<MATLAB path>/toolbox/wt/host/+wt". Please see the below debugging screenshot. 
This is the cause for the error you've received. 
If you'd like to edit the file "<MATLAB path>/toolbox/wavelet/core/wavelet/@cwtfilterbank/wt.m" using the "edit" command, here are three options:
  1. Run the command "edit wt.m". This will search only for M files and successfully finds the correct file to edit.
  2. The "wt.m" file is part of the class folder "@cwtfilterbank". Running the command "edit cwtfilterbank.wt" will search for "wt" under a class or namespace folder "cwtfilterbank". This also finds the desired file to edit.
  3. Specify either the full path, or a partial path, of the file you want to edit. This will provide more details for the "edit" function to search for. For example, "edit <MATLAB path>/toolbox/wavelet/core/wavelet/@cwtfilterbank/wt.m" for the full search path finds the desired file. However, "edit wavelet/@cwtfilterbank/wt.m" as a partial path is also able to find the desired file.
Please see the documentation on the "edit" function for more details.

More Answers (0)

Categories

Products

Release

R2025b

Community Treasure Hunt

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

Start Hunting!