If you are in debugging mode,then you can see the variables data when you hover over them and in command window also you can get those variables.
You get the variables data only when thay are in the workspace.
You can refer https://in.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html and https://in.mathworks.com/help/matlab/workspace.html for more information.
Hope this helps.