https://nl.mathworks.com/help/matlab/ref/matlab.lang.workspace.globalworkspace.html
matlab.lang.Workspace.globalWorkspace - Store variables from global workspace - MATLAB
This MATLAB function creates a workspace object that contains a copy of variables in the global workspace.
matlablangworkspacestorevariables