Extract non zero term from Vector
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Zhenteng Shen
am 30 Aug. 2017
Beantwortet: Omur Bas
am 31 Aug. 2017
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?
0 Kommentare
Akzeptierte Antwort
Guillaume
am 30 Aug. 2017
Bearbeitet: Guillaume
am 30 Aug. 2017
A quick search for "simulink nonzeros" returns as its first link this find block. If you set the Show output port for nonzero input values to true, then you'll get the nonzeros values.
2 Kommentare
Guillaume
am 30 Aug. 2017
As I wrote:
If you set the Show output port for nonzero input values to true, then you'll get the nonzeros values.
Weitere Antworten (2)
Omur Bas
am 31 Aug. 2017
If all the other elements are zero, and you don't need the index, then Sum of Elements block would do the trick.
0 Kommentare
Siehe auch
Kategorien
Mehr zu General Applications finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!