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"

 采纳的回答

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 个评论

how to call the 7th cell only?
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