call a matlab script in a script

后端 未结 4 1980
没有蜡笔的小新
没有蜡笔的小新 2021-02-13 03:20

I have two matlab script files .m (not function files) and if I want to call another script in my current script, which command should I use? Thank you.

4条回答
  •  春和景丽
    2021-02-13 03:33

    As you said, if your script2 is in the same folder as your script1, you can call it with its name. script2

    If it is in another folder, you can use 'run'. run("../path/to/your/script/script2")

提交回复
热议问题