How can i append cell arrays

3 vues (au cours des 30 derniers jours)
shubham shubham
shubham shubham le 7 Déc 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?

Réponse acceptée

Stephen23
Stephen23 le 7 Déc 2019

Plus de réponses (0)

Catégories

En savoir plus sur Data Types dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by