Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

1 visualización (últimos 30 días)
Sriram Padavettan
Sriram Padavettan el 29 de Jul. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 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?

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by