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

回答 (2 件)

You are trying to access allements that don't exist. Try this
% xdd(:,i), xdd(:,i+1) % WRONG
xdd(i), xdd(i+1) % GOOD
Walter Roberson
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

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

質問済み:

2021 年 9 月 1 日

回答済み:

2021 年 9 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by