Execute .m file using GUI

1 次查看(过去 30 天)
Arif
Arif 2011-10-19
I would like to run a .m file by using pushbutton in GUI, the .m file output is an array which is not loaded in the workspace. Is there anyway to execute .m file using GUI or to load the output.
Thanks, Arif

采纳的回答

Fangjun Jiang
Fangjun Jiang 2011-10-19
Is your .m file a function or a script? You need to understand the difference. Functions and Scripts.
If it is a function, you can use output argument to pass in the data. If it is a script, you can run the .m file directly with the GUI function callback to set up the data, although this approach is not recommended.
  4 个评论
Fangjun Jiang
Fangjun Jiang 2011-10-20
If you want to make Final_Array available in base workspace, run this at the end of the function.
assignin('base','Final_Array',Final_Array);
Arif
Arif 2011-10-20
Thank you very much.This is what I want.It solved my problem.
-Arif Khan

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Environment and Settings 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by