[Simulink] How to process 2D vector row by row with gaps between rows
Show older comments
Dear expert,
Need to process a 2D vector, row by row with enable signal. I am trying to select a row (by using DSP toolkit | Select row) first; then use ubuffer to get elements.
The challenging part is to introduce gaps between rows, my row processing unit is a gated block, active only upon enable pulse signal.
- Enable signal sample time = 1;
- Row select logic sample time = row_width;I wish the vector is sampled only once per row, then the processing block can take row_width sample time to process the row. Then wait a bit before moving onto the next row.
I could get this to work only by having the gap width equal to the row_width or no gap at all. Because of the Select Rows block nature of item#2 in the following notes, I am stuck with the enabling pulse of duty cycle of 50%.
Not able to sample the 2-D vector at rate of other than N*row_width (because of Ubuffer) which is understandable.
I've also tried using trigger/enable on the Select row block, but the subsystem could only inherit sampling rate from the index port which is "1", the Unbuffered elements became 1/row_width each.
But is there a way to get asynchronous type of row selection?
- For example, all I want is to fetch a row, and do something. When done fetch another row.
Please comment
Found some interesting facts about Simulink block (for example):
- Can use enable to gate Unbuffer, but if the enable pulse is any shorter than the frame length, there is no output at all.
- DSP toolkit | Select Rows continuously spit out row one even if Idx port has "0" (Index mode: One-based)
Answers (1)
legendbb
on 26 Jul 2012
0 votes
Categories
Find more on Scopes and Data Logging 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!