MATLAB Answers

How to run a .m script for all folders in a directory?

3 ビュー (過去 30 日間)
Ivan Mich
Ivan Mich 2021 年 4 月 21 日
コメント済み: Stephen 2021 年 4 月 22 日
Hello,
I have a question about a code. I have a .m script. This script requires 2 inputs in a folder in order to run. But I would like to run this .m script for all folders in a directory (path). The reason is that each input has different numbers so different results of each run of .m code will arise.
Could you please help me?
  10 件のコメント
Stephen
Stephen 2021 年 4 月 22 日
"What should I do?"
Use functions.
Use absolute/relative filenames.
Avoid CD.
Avoid scripts for serious work (i.e. for anything versatile, expandable, repeatable, reliable, testable, ...)

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by