I would like to shorten the code, but keep the same type and size of the variable N{t}{w}(i).
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
for t = 1:3
for w = 1:3
for i=1:10
N{t}{w}(i) = 0;
end
end
end
0 commentaires
Réponses (1)
Walter Roberson
le 29 Mai 2023
Modifié(e) : Walter Roberson
le 29 Mai 2023
N = repmat({repmat({zeros(1,10)}, 1, 3)}, 1, 3)
0 commentaires
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements 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!