Can I save a MATLAB variable generated by a function into another MATLAB function?

3 ビュー (過去 30 日間)
Gazi Alam
Gazi Alam 2020 年 9 月 17 日
回答済み: Asad (Mehrzad) Khoddam 2020 年 9 月 17 日
Hi,
I know how to save a variable to a matlab script. But I need to save the variable into another function. Does any body know is it possible to do?
Thanks

回答 (1 件)

Asad (Mehrzad) Khoddam
Asad (Mehrzad) Khoddam 2020 年 9 月 17 日
You can use global variables by this line of code in all functions that share the same variables:
global var1 var2 var3

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by