How can i append cell arrays

2 Ansichten (letzte 30 Tage)
shubham shubham
shubham shubham am 7 Dez. 2019
Beantwortet: Stephen23 am 7 Dez. 2019
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?

Akzeptierte Antwort

Stephen23
Stephen23 am 7 Dez. 2019

Weitere Antworten (0)

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by