Index in position 2 exceeds array bounds (must not exceed 1).????

1 回表示 (過去 30 日間)
Shahid Mahmood
Shahid Mahmood 2019 年 11 月 24 日
回答済み: Rik 2019 年 11 月 24 日
dimension of x is 100x1

回答 (1 件)

Rik
Rik 2019 年 11 月 24 日
You are trying to access x(:,2) in the second iteration of either loop. Either change that, or switch to size(x,2) in your loop definition.

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by