フィルターのクリア

Which is best :define variables as global or pass them as arguments?

1 回表示 (過去 30 日間)
nedjma ALI
nedjma ALI 2013 年 5 月 26 日
Hello everyone, I would like to know which is best: To define variables global in main & function like global var1, var2 or pass then as arguments to function like [out1]=functionName(var1,var2)

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 5 月 26 日
Passing them as argument is better

その他の回答 (1 件)

Image Analyst
Image Analyst 2013 年 5 月 26 日

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by