Index exceeds the number of array elements. Index must not exceed 4.
18 次查看(过去 30 天)
显示 更早的评论
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
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
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
2024-6-8
I got the same error, and thank's to your comment I found the solution, thank you !
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!