# Math Help - matlab global variable

1. ## matlab global variable

How can i define a global variable in matlab

global a ;
a = 56;

i cannot use the value of a inside a function

2. Originally Posted by AUCC
How can i define a global variable in matlab

global a ;
a = 56;

i cannot use the value of a inside a function

a=36;
global a