Put a matrix back to zeros (looking for an elegant solution)
Afficher commentaires plus anciens
Hello,
I have one matrix that is generated withe zeros:
A=zeros(5,4);
And, during the cycle matrix A get different values to make some math. I want that in the end of the cycle the matrix A come back to is original values so it can start it all over. Is there any elegant solution or should i just use the same code that used to initialize the matrix?
Réponse acceptée
Plus de réponses (1)
Sean de Wolski
le 26 Déc 2012
1 vote
That's what I would do. zeros is the most elegant want to create zeros :)
2 commentaires
André Pacheco
le 26 Déc 2012
Sean de Wolski
le 26 Déc 2012
You could write clean() to do this if you wanted, considerably less elegant though...
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!