Simulink warning message - Cant find solution

조회 수: 11 (최근 30일)
Nshine
Nshine 2018년 11월 25일
답변: Nshine 2019년 3월 18일
Hi. I keep getting the following warning from my Simulink Diagnostic Viewer.
Warning: A value of class "uint64" was indexed with no subscripts specified. Currently the result of this operation is the indexed value itself, but in a future release, it will be an error.
I cant find any advice of where this warning is originating from. I've tried googling the warning message and have found a couple of examples of similar messages, but no suggesting on how to address these.
Can anyone offer any advice?
  댓글 수: 1
Nshine
Nshine 2018년 11월 25일
I am running Simulink R8.9 (2017a)

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

채택된 답변

Nshine
Nshine 2019년 3월 18일
I followed this up with Mathworks support and recieved this response. Hopefully you will find it helpful
Please note that the source of a warning with the structure
"Warning: A value of class "<some class>" was indexed with no subscripts specified. Currently the result of this operation is the indexed value itself, but in a future release, it will be an error."
is code which uses indexing into variables with empty parentheses. When all warnings are enabled, indexing into variables with empty parentheses issues a warning message of this type. For example, the following code issues a similar warning as listed below
>> warning('on');
>> x = [1 2 3 4 5];
>> y = x()
Warning: A value of class "double" was indexed with no subscripts specified. Currently the result of this operation is the indexed value itself, but in a future release, it will be an error.
>> y
=
1 2 3 4 5
Note that this warning message is suppressed (i.e. 'off') by default. To see a list of warnings suppressed by default, enter 'warning' command without arguments in the MATLAB Command Window after restarting MATLAB. The command "warning('on')" turns on all warnings, including those which are 'off' by default. If you want to enable all other warnings except this particular one, I would recommend you to execute the following commands in the MATLAB Command Prompt:
>> warning('on');
>> warning('off','MATLAB:subscripting:noSubscriptsSpecified');
I hope the above information is useful to you. If there is any further query regarding this, please feel free to reply to this mail and I will be happy to assist you further.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Configure and View Diagnostics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by