for loop for binary values from 00000 to 11111
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
i want to enable rows of a pixel by giving logic high to them , I want write a FOR loop so that first 000000 then 10000 then 01000 then 11000.......11111 are given as input plz guide me with this
note: MSB and LSB are interchanged
0 commentaires
Réponse acceptée
Andreas Goser
le 11 Oct 2012
Why a loop? Try
A=1:16
dec2bin(A)
And then flip the order.
2 commentaires
Walter Roberson
le 11 Oct 2012
Only if you can find a way to pause() for 10 millisecond, but that is a much finer time resolution than pause() supports.
Please think more about whether you want the signal itself) to be a particular value for 10 millisecond at a time, or if you want a signal to be _represented as-if it was a value for 10 millisecond. If you are doing real-time work such as controlling a motor, then you would like the signal itself to have the value for real seconds, but if you are trying to produce a graph of a communications system, then you want the representation of 10 milliseconds.
Plus de réponses (1)
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!