"normalize" Does Not Work on R2020a

11 ビュー (過去 30 日間)
Kamal Premaratne
Kamal Premaratne 2020 年 7 月 1 日
コメント済み: Kamal Premaratne 2020 年 7 月 1 日
I recently updated to R2020a, and
> normalize(v, 'norm', 2)
does not seem to work any more. For instance,
>> w = 1:5
w =
1 2 3 4 5
>> normalize(w, 'norm')
Error using sum
Invalid option. Option must be 'all', 'double', 'native', 'default', 'omitnan', or 'includenan'.
Error in normalize (line 23)
z=sum(A,dim);
>> normalize(w, 'norm', 2)
Error using normalize
Too many input arguments.
Any advice?

採用された回答

Steven Lord
Steven Lord 2020 年 7 月 1 日
編集済み: Steven Lord 2020 年 7 月 1 日
In my installation of release R2020a line 23 of the normalize.m included in MATLAB is a comment that's about a third of the way through the help text. This suggests to me that you've created or downloaded a normalize.m that's taking precedence over the one included in MATLAB. To check, what does this command show?
which -all normalize
If you see any normalize.m files listed that are not under your MATLAB root directory (which you can see by running the matlabroot command) try renaming them.
You might also want to check that the directory in which that other normalize.m is located doesn't have other functions that are taking precedence over other MathWorks functions to avoid this same type of problem with those other MathWorks functions.
  1 件のコメント
Kamal Premaratne
Kamal Premaratne 2020 年 7 月 1 日
I checked, and just as you guessed, there was another normalize.m (a remnant from an old project). I deleted it, and everything works fine now. Thank you.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

タグ

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by