What is the fundamental difference in how MATLAB scripts and functions interact with the workspace?
-
A
Scripts create a temporary workspace, while functions use the global workspace.
-
B
Scripts operate in the base (or caller's) workspace, while functions have their own private, local workspace.
-
C
Both scripts and functions operate in their own private workspaces, isolated from the base workspace.
-
D
Functions can modify base workspace variables directly without using 'global', but scripts cannot.