Can the variable selector block operate on variable-sized data?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I wish operate an fft on each column of a matrix. I am doing this by using a variable selctor block in a for iterator block. My data is classed as variable-sized (however does not change size). The variable selector block does not like variable-sized data. Is there a way around this?
0 comentarios
Respuestas (1)
Pramil
el 21 de Feb. de 2024
Yes, there is a way around this problem. Use a "For Each Subsystem" block, which allows you to apply the FFT block to each column of the matrix individually.
Double click on the "For Each Subsystem" block and place the “FFT” block in between the “inport” and the “outport” block.
Set the "Partition Dimension" to “2” to iterate over the second dimension (columns) of the input matrix. Set the "Partition Width" to “1” to process one column at a time.
You can check out this documentation for knowing more about the "For Each Subsystem" block :
I have attached a sample model for your reference.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!