If the value of ‘int’ is less than 1, the loop counter is satisfied at the outset, and the loop never iterates.
The Signal Processing Toolbox buffer function is what I always use to segment signals. It is just easier than writing my own code.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!