hello can you please help I'm getting this errorIndex in position 2 exceeds array bounds (must not exceed 1). Error in BetaNewmark_MDOF (line 21) xd(:,i+1)=xd(:,i)+(1-b)*dt*x
1 次查看(过去 30 天)
显示 更早的评论
回答(2 个)
darova
2021-9-1
You are trying to access allements that don't exist. Try this
% xdd(:,i), xdd(:,i+1) % WRONG
xdd(i), xdd(i+1) % GOOD
0 个评论
Walter Roberson
2021-9-1
you only assign to a single column of xdd but you try to access up to column that is one more than the number of times you have
0 个评论
另请参阅
类别
在 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!