Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How to feed a variable back into a While Iterator Block in Simulink?

1 vue (au cours des 30 derniers jours)
Sriram Padavettan
Sriram Padavettan le 29 Juil 2020
Clôturé : MATLAB Answer Bot le 20 Août 2021
I'm new to Simulink and need to implement a while loop to accomplish a task. This while loop should basically add to a matrix that functions as an accumulator. I'm not sure how to feed that accumulator array back to the while loop such that it repeatedly adds to it. Below is the pseudocode for the loop I am trying to implement. It basically:
BEFORE LOOP: initialize empty 1024x1 sample buffer, 1x13 result matrix
*************LOOP STARTS****************
  • Reads 512 Audio samples
If first iteration, fill first half of sample buffer with 512 read samples
If second iteration, fill second half of sample buffer with 512 read samples
If any subsequent iteration, slide second half of sample buffer to first half and fill the second half with 512 read samples
  • Perform an STFT on the size 1024 buffer of samples, then calculate 13 MFCC's from that STFT (this results in a 1x13 matrix)
  • add this 1x13 matrix to the 1x13 result array
**********LOOP ENDS****************
AFTER LOOP: Divide result array by 280
Heres the same pseudocode written in a text editor if it makes it easier to understand:
This loop should execute for 280 iterations. Can anyone help me figure out how to implement it?

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by