From: Nils on 20 Jul 2010 15:52 Hello, In Simulink I'm trying to process data frame-wise, i.e. collect e.g. 32 points of data, process it, output while collecting the next 32 points of data, process and so on. The buffer-block seem to collect the 32 points of data but then update the buffer at each sampling instance with the 32 last points. I want it to keep only the data who's corresponding output never has been output before, so to speak. The buffer block always (except for in the very beginning) contains 32 points while I want my buffer to contain a decreasing number of points, until it's full. Then all data is flushed and the buffer starts to get filled again. Any idea how to solve this with blocks? The processing would be similar to a STFT/iSTFT-operation without overlap. Thanks in advance!
From: Nils on 22 Jul 2010 18:41 Correction: The buffer block always (except for in the very beginning) contains 32 points while I want my buffer to contain a INCREASING number of points, until it's full. Not decreasing, obviously.
From: Nils on 24 Jul 2010 20:52 "Nils " <do_not_use(a)gmail.com> wrote in message <i2ahe4$336$1(a)fred.mathworks.com>... > Correction: > > The buffer block always (except for in the very beginning) contains 32 points while I want my buffer to contain a INCREASING number of points, until it's full. > > Not decreasing, obviously. Ok, so the problem was fairly easily solved, I think. My setup in simulink is like this: ----------------- ---------------- ----------------- ----------------- -------------- | source | -> | buffer | -> | function | -> | unbuffer | -> | sink | --------------- -------------- -------------- ---------------- -------------- Where the function-block needs to process 1 N-point window at a time and no window shares any points with the preceding window (non-overlapping). I opened the function block and went tools - edit data/ports - Selected Output - Sampling Mode: Frame based. That gives me the correct result, but now i'm worried that it does it in a very computationally inefficient manner. Since that option is only for the output port I'm worried that the function block does the computation for a window sliding 1 sample at a time (and hence does the computation for N windows for each output window) but outputs non-overlapping frames. Is that even a possibility or am I worrying for no reason? Please, any thoughts?
|
Pages: 1 Prev: Question about dicom read Next: Open a .fig, adding line or data |