Issues with PATH, File in Directory on PATH not found

3 views (last 30 days)
I found several other similar issues, but none addressed the problem I am encountering. I am trying to run my program but am having issues with accessing classes and function in other directories on the PATH. Here is the error and the 'path' command clearly shows the directory existing on the PATH. Likely am missing something simple. Any insight or help is appreciated!
Building with 'Microsoft Visual C++ 2019'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2019'.
MEX completed successfully.
Running data plotter...
'ui_settings' is not found in the current folder or on the MATLAB path, but exists in:
C:\Users\MyName\Documents\MATLAB\proj_folder\functions\ui_class (*** <---- This folder exists on the path)
Change the MATLAB current folder or add its folder to the MATLAB path.
Error in dive_log_plotter (line 27)
ui_settings = ui_settings(false);
>> path
MATLABPATH
C:\Users\MyName\Documents\MATLAB\proj_folder
C:\Users\MyName\Documents\MATLAB\proj_folder\plot_me
C:\Users\MyName\Documents\MATLAB\proj_folder\mex
C:\Users\MyName\Documents\MATLAB\proj_folder\functions\ui_class (*** <---- The folder in question is listed on the PATH)
C:\Users\MyName\Documents\MATLAB\proj_folder\functions\ui_functions
C:\Users\MyName\Documents\MATLAB\proj_folder\functions
C:\Users\MyName\Documents\MATLAB\proj_folder\custom_plotters
.
.
.
.
I am using a fresh install of MATLAB R2020b and my operating system is Windows 10.
  3 Comments
John Fisher
John Fisher on 5 Feb 2021
Edited: John Fisher on 5 Feb 2021
Thank you for the response. I am fairly new to MATLAB, I transfered this project over from Octave (where it worked) and am trying to get it up and running in MATLAB. I ran the script 'oct2ml' to help convert the project to the correct syntax, but maybe it missed something. Going through the file myself I don't see any glaring issues.
Is there an established method for debugging a parse error in MATLAB? The error message above gives very little workable information. Typically I would use a debugger with breakpoints but that doesn't appear to apply in this case.
The Code Analyzer is giving me no warnings or errors in the file. Using mlintrpt('ui_settings.m') gives a report with no messages. I can potentially share the code to get more eyes on it but believe it would be better if I can learn a debug process that I can use in the future.
John Fisher
John Fisher on 5 Feb 2021
Update: Appears the issue was that the variable being assigned had the same name as the function call.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!