Illustration of Variable scope:
Running this function does not add any of variables to the workspace, as elaborated:
>> disp(mysum([5 9 1]))
The variables that are also defined in the Command Window cannot be used in a function.
Though, scripts (as opposite to the functions) do interact with the variables which are defined in the Command Window. For illustration, the function is changed to be a script mysummfile.