MATLAB: Error: Function definitions are not permitted at the prompt or in scripts.

function defintions

Hi, can someone tell me what to do to solve the error prompt 'Function definitions are not permitted at the prompt or scripts'

Best Answer

Don't try to define a function at the prompt or in a script. Put functions in their own M-files.
Related Question