index exceed matrix dimension error

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"

 채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 12월 18일

0 개 추천

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

srycandy
srycandy 2011년 12월 18일
how to call the 7th cell only?
Fangjun Jiang
Fangjun Jiang 2011년 12월 18일
The problem is that you don't have the 7th cell. Check the size of m using size(m)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by