Use value app designer in script.m


采纳的回答
The solution is simple: use a function instead of a script (although it is possible to write a script that will use this value).
A script shares the workspace with the calling environment, while a function uses input and output arguments. That makes functions a documentable interface that can be updated without worrying that code using the function will break.
You should not use a script for things you plan to use after next week.
If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks). There is a chapter on functions.
7 个评论

更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
另请参阅
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
