Defining Global Variables or passing variables through function in Matlab?

111 views Asked by At

I have a main function and some sub-functions.
There are some indicator variables (0 or 1) that other sub-functions need them.These values are updated in functions.
Which option is better regarding to CPU speed?
1) Passing through functions
2) define global variables.

0

There are 0 answers