Global variable in octave
1 answer
You have to declare var also global inside the function as described here: https://www.gnu.org/software/octave/doc/interpreter/Global-Variables.html
global m = 1;
function p = h()
global m;
m
endfunction
h()
+7
source to share