how can i run .m file from MATLAB GUI
4 次查看(过去 30 天)
显示 更早的评论
Hi.
i would like to run .m file (script) grom a GUI. the way now i am doing is .... i created a push button in the GUI and in callback function i gave the name of the .m file.. but it is not working..
is there any other ways to do this.. kindly suggest me
Thanks & Regards
venkatapathi.p
0 个评论
采纳的回答
Walter Roberson
2012-5-4
If the script is on your path, just give the name of the script, without any directory and without the ".m" extension.
Otherwise, use run()
5 个评论
geomod
2012-5-4
Hi,
I assumed that the variables got their value in the GUI...
What exactly is your goal?
You have a GUI, you click on a button, the script runs...
and then the variables are defined in the script and then you want them appear in the workspace?
Walter Roberson
2012-5-4
Is it definitely a script, or is it a function? If it starts with a "function" line then it is a function with its own workspace.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!