there might be no viable solution to the dilemma
either one can use sum in more complex expressions
and sums within sums or global vars are inaccessible
workaround is to either put sum into function
definition to do not use global variables
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
this is due sum in enclosed into function definition
there might be no viable solution to the dilemma
either one can use sum in more complex expressions
and sums within sums or global vars are inaccessible
workaround is to either put sum into function
definition to do not use global variables
In order to change the value of the global variable x,
you must also declare it to be global within
the function body, like this:
function f ()
global x;
x = 1;
endfunction
Other words accessed variables must be identified and
marked as global ...
solution would be to define global(x)
that would formally define global vars ...