- () parentheses refer to the cells themselves,
- {} curly braces refer to the cell contents.
how to store the matrix value in cell array?
36 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have matrix C=100 by 10 and I want to store the values of matrix in cell array. The code is not working. Please help me on this
T3=cell(1,10);
for k1=1:n
T3(k1)=C;
end
0 commentaires
Réponse acceptée
Stephen23
le 15 Sep 2020
Modifié(e) : Stephen23
le 15 Sep 2020
If C is a matrix, then you need to use curly braces to access the contents of the cell array T3:
T3 = cell(1,10);
for k1 = 1:n
T3{k1} = C;
end % ^ ^ curly braces
The difference is very simple:
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Cell Arrays 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!