Execution of script fzero as a function is not supported:

i installed only matlab and simulnuk toolboox but when i run this function fzero even from the examples in doc i get
Execution of script fzero as a function is not supported:<current folder path>

1 件のコメント

dpb
dpb 2021 年 11 月 8 日
You've somehow got an alias script file named fzero on the MATLABPATH.
What does
which -all fzero
return?
It should be something like
>> which -all fzero
C:\ML_R2020b\toolbox\matlab\optimfun\fzero.m
>>
with your own installation root directory, of course.
If there's another fzero, either rename it to something else like my_fzero.m or remove it and all should be well...

サインインしてコメントする。

回答 (1 件)

Steven Lord
Steven Lord 2021 年 11 月 8 日

0 投票

You likely wrote or downloaded a script file named fzero.m that's taking precedence over the fzero function included in MATLAB. To check this, run this command and look for files not under matlabroot.
which -all fzero

カテゴリ

ヘルプ センター および File ExchangeDownloads についてさらに検索

質問済み:

2021 年 11 月 8 日

コメント済み:

dpb
2021 年 11 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by