필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
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 CenterFile Exchange에서 Introduction 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