How can I solve this matrix problem?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens

0 commentaires
Réponses (2)
Sulaymon Eshkabilov
le 4 Juin 2021
You can start working with eye() and rot90()
Then you can try with for loop, i.e. [for .. end] and [while .. end]
Jonas
le 4 Juin 2021
Use a for-loop which goes from 1:n over the two dimensions, and use an if-statement to write a 1 and an else statement to write a 0, pending on if we comply with being on that diagonal.
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!