Extract non zero term from Vector
显示 更早的评论
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?
采纳的回答
更多回答(2 个)
Use it in a Matlab function block?
5 个评论
KL
2017-8-30
So fast. Just about when it hit me and came back here to edit :D
Zhenteng Shen
2017-8-30
KL
2017-8-30
You really can do this in Simulink. Check
Zhenteng Shen
2017-8-30
Omur Bas
2017-8-31
0 个投票
If all the other elements are zero, and you don't need the index, then Sum of Elements block would do the trick.
类别
在 帮助中心 和 File Exchange 中查找有关 General Applications 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!