在脚本中调用Matlab脚本 [英] call a matlab script in a script

查看:80
本文介绍了在脚本中调用Matlab脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个matlab脚本文件.m(不是功能文件),如果要在当前脚本中调用另一个脚本,应该使用哪个命令?谢谢.

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.

推荐答案

我找到了答案.

只需在另一个脚本中命名该脚本即可:

Just name the script in the other script:

myOtherScript

如果愿意,可以使用run('myOtherScript'),但它将在内部结束做与直接命名相同的操作;但是,您可能会喜欢强调它给出了一个被提及的脚本.

You can use run('myOtherScript') if you prefer, but it will end up internally doing the same thing as naming it directly; you might, though, like the emphasize that it gives that it is a script being mentioned.

这篇关于在脚本中调用Matlab脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆