how to slove Function definitions are not permitted in this context?

1 次查看(过去 30 天)

回答(1 个)

Steven Lord
Steven Lord 2018-4-5
The ability to create scripts containing local functions was introduced in release R2016b. If you are using an older release, you cannot include a local function inside a script file.
If you are using release R2016b or later, is this your entire script file? You're not trying to define the local function inside a for or while loop or inside an if / elseif / else block, are you?

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by