index exceed matrix dimension error

10 visualizaciones (últimos 30 días)
srycandy
srycandy el 18 de Dic. de 2011
how to solve this? if m{7}== 0 m{7}= 0.000000001; else m{7} = m{7}; end since i get error "index exceed matrix dimension"

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 18 de Dic. de 2011
You have less than 7 cells in your variable m. Do the following to understand the error.
>> clear m; m=cell(6,1);m{7}
??? Index exceeds matrix dimensions.
  2 comentarios
srycandy
srycandy el 18 de Dic. de 2011
how to call the 7th cell only?
Fangjun Jiang
Fangjun Jiang el 18 de Dic. de 2011
The problem is that you don't have the 7th cell. Check the size of m using size(m)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by