如果你知道函数caller工作区与Base工作区的区别就好理解了。
你通过GUI运行模型是使用的sim函数的话,由于sim是在GUI的工作区调用的,所以模型也被提升到GUI的工作区里了,而不是在Base workspace。所以你最终仿真完毕在base workspace里是找不到的。
你在GUI的回调函数里,sim之后,还需要通过evalin()来将仿真的结果变量保存到base workspace。
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!