For loops in stateflow
Show older comments
I'm not understanding how for loops are expanded in state flow. I the chart below I'm attempting to break a 32-bit value into 8, 4-bit chunks and store them into an array. I'm expecting bits 32-29 to go in buf(1), bits 28-25 in buf(2), bits 24-21 in buf(3) and so on. However, it seems that bits 1-4 get stuffed into each element of buf. Why is this not working properly and what is the correct way to implement something like this?

Accepted Answer
More Answers (0)
Categories
Find more on Decision Logic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!