Accessing value in a cell
古いコメントを表示
Hi,
I am trying to access value of a cell
>> a={'1,65,4,5'}
a =
1×1 cell array
{'1,65,4,5'}
>> a(2)
Index exceeds the number of array elements (1).
>> a{2}
Index exceeds array bounds.
Thanks
Jinang
3 件のコメント
Look at what MATLAB is telling you:
a =
1×1 cell array
How many cells does your cell array have? (hint: one)
What do you expect to occur when you try to access a non-existent cell?
Disregarding your buggy indexing, what is the expected output?:
- the character ','
- the characters '65'
- the number 65
- something else...
jinang patel
2019 年 12 月 1 日
Stephan
2019 年 12 月 1 日
See my edited answer
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!