- Check for Case Sensitivity: Linux filesystems are case-sensitive, unlike Windows. Ensure the case of your file path and the file name in your MATLAB code exactly match the actual path and file name.
- Check File Permissions: Ensure that the file permissions on the custom header file and its directory allow MATLAB to read them. You can check the permissions using the ‘ls -l’ command in the terminal and modify them using the ‘chmod’ command if necessary.
- MATLAB Preferences and Cache: Sometimes, MATLAB's internal preferences or cache can cause issues. Try clearing MATLAB's cache and resetting preferences to see if this resolves the issue. Refer to the following documentation to get more information: https://www.mathworks.com/help/matlab/ref/rehash.html
- Update MATLAB Path: Ensure that MATLAB's internal path (not the system $PATH variable) includes the directory containing your header file. You can add paths to MATLAB's search path using the ‘addpath’ function. The following link will help guide you with the same: https://www.mathworks.com/help/matlab/ref/addpath.html
Unable to open custom file while building model in Linux
조회 수: 3 (최근 30일)
이전 댓글 표시
I'm trying to build a model in Linux environment. But it throws error as unable to open source file. This error is for a custom header file, which is verified to be present in the path (not current path).
I have tried to build the same model in Windows environment, where is builds without any issues.
Does anyone have solution to this problem? Thanks in advance.
P.S. I'm using MATLAB R2022b.
댓글 수: 0
답변 (1개)
Dhruv
2024년 5월 28일
Hi Shardul,
To help resolve the issue, here are some steps which you can follow that might help you:
However, if you are still encountering issues, you may reach out to MathWorks Technical Support as they will assist you further.
Hope this helps!
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!