Extract non zero term from Vector
Mostrar comentarios más antiguos
Hello, I have a 1 x 9 vector which contains all zeroes apart from one element which will take a +ve or -ve number, it's index will change, how do i extract this non zero number in Simulink? Is there a block for it?
Respuesta aceptada
Más respuestas (2)
Use it in a Matlab function block?
5 comentarios
KL
el 30 de Ag. de 2017
So fast. Just about when it hit me and came back here to edit :D
Zhenteng Shen
el 30 de Ag. de 2017
KL
el 30 de Ag. de 2017
You really can do this in Simulink. Check
Zhenteng Shen
el 30 de Ag. de 2017
Omur Bas
el 31 de Ag. de 2017
0 votos
If all the other elements are zero, and you don't need the index, then Sum of Elements block would do the trick.
Categorías
Más información sobre General Applications 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!