How can i append cell arrays

8 ビュー (過去 30 日間)
shubham shubham
shubham shubham 2019 年 12 月 7 日
回答済み: Stephen23 2019 年 12 月 7 日
if i give input like this score ({{[8,2,10,8,7,9,1,12], [9,6], 41};
{[10,10,10,10,10,1,1,1,15], [10,10]};
{[0,0,5,10,0,0,11], [3,4], 26}}, 85,35)
I want to assign a value to the cell array if it doesn't have a value in the input i.e {[10,10,10,10,10,1,1,1,15], [10,10]}; - it is a 1*2 cell array and i want to input a value in it's 1*3 position.
I used s{2,3} = 45; but it doesn't assign the value to the subcell which is {[10,10,10,10,10,1,1,1,15], [10,10]} instead it appends a 3*3 matrix and assigns it to that.
How can I check and then append the sub cell?

採用された回答

Stephen23
Stephen23 2019 年 12 月 7 日
C{2}{3} = 45

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by