I figure it out based on another thread with a similar question. I first declared a variable inside a private property and then used the function assignin() in a callback to generate the calculations to the workspace.
Can I save calculations performed in App Designer to the workspace?
2 次查看(过去 30 天)
显示 更早的评论
Hi, I am creating an application which performs calculations based on user inputs and plots it on a graph. I would like to add a button that saves or exports the graph data to the MATLAB workspace (alternatively save it as a .mat file in a specified directory). Any ideas on how to do this? /danbro
2 个评论
Stetson Spencer
2018-11-21
Hey would you mind sending me a link to the thread. I have a similar question also
回答(1 个)
Thomas Fournier
2021-8-11
You can use the command "assignin"
for exemple, here is a button's callback that send all the app data to the workspace:
function Send2workspaceButtonPushed(app, event)
assignin("base","app",app);
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!