MATLAB normalize function shadowed by DSP toolbox normalize function

조회 수: 2 (최근 30일)
Hi,
When I am trying to use in MATLAB R2019a,
normalize(X,'range');
The following error occurs,
Error using sum
Invalid option. Option must be 'all', 'double', 'native', 'default', 'omitnan', or 'includenan'.
Error in normalize (line 10)
It seems the matlab is using the normalize function in DSP toolbox. How can I use the MATLAB default normalize function?.
Thanking in advance for your help

채택된 답변

Steven Lord
Steven Lord 2019년 10월 29일
Can you confirm that MATLAB is using the version from DSP System Toolbox and not the one from MATLAB or that you've created or downloaded? Run this command with the X on which you're trying to operate in the workspace:
which -all normalize(X, 'range')
I don't think the version of normalize in DSP System Toolbox even calls sum, and line 10 of the one included in MATLAB is a help text comment. I think you have a different normalize.m that's shadowing the one in MATLAB. Rename that normalize.m, remove it, or move it lower on the MATLAB path than the one in MATLAB.
  댓글 수: 1
Kaveen Liyanage
Kaveen Liyanage 2019년 10월 29일
Hi, Thanks for the response,
Yes, following is the output.
C:\Users\******\******\PRML-PRMLT-v2.0.1-1-g314f475\PRML-PRMLT-314f475\common\normalize.m
C:\Program Files\MATLAB\R2019a\toolbox\matlab\datafun\normalize.m
I removed the first one from the path. Now works fine. Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Array and Matrix Mathematics에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by