필터 지우기
필터 지우기

Index exceeds the number of array elements. Index must not exceed 4.

조회 수: 7 (최근 30일)
Batuhan Durusoy
Batuhan Durusoy 2024년 5월 1일
댓글: Awatif ESHAIMI 2024년 6월 8일
Index exceeds the number of array elements. Index must not exceed 4. I get it in Simulink. I'm getting this error and I couldn't find a solution. Can you help me.
  댓글 수: 1
Walter Roberson
Walter Roberson 2024년 5월 1일
That is not a helpful message :(
Testing, I see that the problem appears to be with the Multi-Winding Transformer -- but I cannot see any problems in the configuration of that block

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

답변 (1개)

Chaitanya
Chaitanya 2024년 5월 6일
Hello Batuhan,
I understand that you are receiving the error “Index exceeds the number of array elements. Index must not exceed 4” while running the model that contains “Multi-Winding Transformer” block.
As suggested by Walter, the issue seems to be with the Multi-Winding Transformer. Upon debugging the provided model, I noticed that there is an issue with the parameters set in the block parameters.
In the block parameters of the Multi-Winding Transformer, in the parameters section, I notice that few of the parameters are not defined according to number windings defined.
In the configuration tab, the number of windings on the left side is 2 and the number of windings on the right side is 4. So, the total windings are 6. However, the following parameters set in the parameters tab are set to be an array of 4 elements. The array should contain 6 elements as there are 6 windings totally.
  • Winding nominal voltages
  • Winding resistance
  • Winding leakage inductances
I further modified these parameters to have 6 elements instead of 4 elements and I was able to run the model without any errors.
I suggest you define the parameters accordingly to rectify the error that you are receiving.
For more information on the parameters please visit the following documentation that provides details that the array must contains ‘n’ number of elements where ‘n’ is number of windings.
I hope that the above information is helpful in resolving the error.
Thanks,
Chaitanya Krishna
  댓글 수: 1
Awatif ESHAIMI
Awatif ESHAIMI 2024년 6월 8일
I got the same error, and thank's to your comment I found the solution, thank you !

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

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by