Running an input script in another script
显示 更早的评论
I got 2 scripts, 1 script with the input (asking people to input a unknown) and I got another file will use the graph from the first script but with a specific value of the unknown.
What command should I use in the second script so that I can call out the first script win the specific value, 20?
1 = First file (required input a value in the workspace) 2 = Second file (call file 1 with a specific value of 20)
Run('1')?
回答(1 个)
Image Analyst
2013-4-13
0 个投票
I don't know why you want the complication of two scripts for this rather than just one, but you can see the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F. Other than that, you can write the parameters to a .mat file and have script2 read it in.
类别
在 帮助中心 和 File Exchange 中查找有关 Variables 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!