I have error in the following code which is used for the structural analysis. If anyone could help ?
2 次查看(过去 30 天)
显示 更早的评论
Index exceeds the number of array elements. Index must not exceed 5.
Error in Strcuture (line 215)
deltaF(dof_el)=deltaF(dof_el)+fel;
This is the error I am getting.
0 个评论
回答(1 个)
Neha
2023-5-2
I understand that you are facing an error regarding array index as deltaF contains only 5 elements. On debugging the code, I was able to find the elements of the dof_el array (after the for loop execution), i.e. [3 4 5 6]. Since the fourth element is greater than 5 (the size of the array), the given error is being displayed. I suggest you to either modify the for loop such that the values of the dof_el array do not exceed 5, or the size of the deltaF array needs to be changed to 6.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!