Issues with PATH, File in Directory on PATH not found

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

One of the ways that problem can occur is if ui_settings.m has a parse error in it. In such a case, the file is found, but the function is not found.
John Fisher
John Fisher 2021년 2월 5일
편집: John Fisher 2021년 2월 5일
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.
Update: Appears the issue was that the variable being assigned had the same name as the function call.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

질문:

2021년 2월 4일

댓글:

2021년 2월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by