Hello guys, i have a push button and I want to laod m-file when I press it, please answer ;)
显示 更早的评论
I make a GUI and I want to add a push button that will load a m-file.
2 个评论
Walter Roberson
2015-10-15
Please explain further what you mean by "load" of an m file. Do you mean execute the file, or do you mean upload from somewhere to somewhere else?
Maciej Wroz
2015-10-16
采纳的回答
更多回答(1 个)
Maciej Wroz
2015-10-16
编辑:Maciej Wroz
2015-10-16
0 个投票
1 个评论
Dennie
2015-10-19
If I understand you correctly, it seems to me that you start the simulink simulation from the m-file, right ? If the m-file is run by the code in the gui, i suppose that the mistake is in the m-file itself. It could be that you use the wrong command to start the simulation. Try using sim() instead of open() or run(). For better help, you should upload the part of the code that currently does this, or give me some more information on what happens and what you would expect to happen.
类别
在 帮助中心 和 File Exchange 中查找有关 Model, Block, and Port Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!