필터 지우기
필터 지우기

ls command on a Mac doesn't work

조회 수: 5 (최근 30일)
Deja C
Deja C 2021년 12월 8일
편집: Shubham 2024년 4월 30일
ls works if I use it in the command window in MATLAB R2021b and in the Mac terminal, but it doesn't work in a live script.
When running a code in the editor window in MATLAB, I always get an error stating that the file is invalid or not found in the directory. I need my code to read a list of files in the directory to go through a loop.
I apologize in advance. I'm not the most fluent in computer science.

답변 (1개)

Shubham
Shubham 2024년 4월 30일
편집: Shubham 2024년 4월 30일
Hey Deja,
In MATLAB, the ls command works similarly to how it does in UNIX-based systems (like Mac's terminal) for listing directory contents. However, when you're working in a MATLAB Live Script or the MATLAB editor and you encounter issues with ls not functioning as expected, it's often due to differences in how the environment handles current directories or path issues.
You may find the below resources useful:
I hope this helps!

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by