How I can solve this kind of error?

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by