ls command on a Mac doesn't work
6 ビュー (過去 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.
0 件のコメント
回答 (1 件)
Gojo
2024 年 4 月 30 日
編集済み: Gojo
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!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!