Simulink vector to scalar stream
Mostrar comentarios más antiguos
I have a fixed-step (1ms) project. I have a block outputting a 7680x1 vector every 1ms. This output feeds a subsytem that does not accept vector input. Only scalar. So its giving a compile error. What can I do?
Respuestas (1)
Ameer Hamza
el 21 de Abr. de 2020
0 votos
See from workspace block: https://www.mathworks.com/help/releases/R2020a/simulink/slref/fromworkspace.html. Create a matrix with two columns in the MATLAB workspace. The first column is the time value, spaces by 0.001 seconds, and the second column is data. This block will read the data, one value at a time.
5 comentarios
yazz.jazz
el 21 de Abr. de 2020
Ameer Hamza
el 21 de Abr. de 2020
Do you want to resample the signal? Currently, you have 7680 samples, do you want to create 7680000 samples with 1us sampling period?
yazz.jazz
el 21 de Abr. de 2020
Ameer Hamza
el 21 de Abr. de 2020
The "from workspace" block serialize the vector to give one value at each time interval. You can change the first column of the input matrix to specify whatever time-sample you want.
Categorías
Más información sobre Subsystems en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!