How I can solve this kind of error?

2 ビュー (過去 30 日間)
Sourasis Chattopadhyay
Sourasis Chattopadhyay 2021 年 10 月 25 日
回答済み: Image Analyst 2021 年 10 月 25 日
and I am writing this code
  1 件のコメント
Rik
Rik 2021 年 10 月 25 日
How are you confirming comb5 actually has row+1 rows on the first iteration?

サインインしてコメントする。

回答 (2 件)

Sobha T
Sobha T 2021 年 10 月 25 日
If comb5 is a one-dimensional array, then you can use : instead of ,
as shown below
comb5(row:end-1)

Image Analyst
Image Analyst 2021 年 10 月 25 日
Before the while loop, put this
[rows, columns] = size(comb5) % Don't use a semicolon
what do you see? Chances are you have 1 row and several columns, so you can't reference comb5(1+1, end) because comb5 does not have 2 rows.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by