I was wondering if there is a function like the one below (less), but instead retrieves values ββthat are not non-zero?
a = [67 0 8 25 0 20 0 90 7 2 9]; smaller10 = a(a < 10) smaller10 = 0 8 0 0 7 2 9
Use
a(a~=0)
or
nonzeros(a).'
You can find the documentation for nonzeros here .
nonzeros
Source: https://habr.com/ru/post/1628023/More articles:C ++ Reading double quotes from a file - c ++In C ++ 11, a dow can reference an enum class defined inside a template argument - c ++Get date from Django DateTimeField - pythonQuick parsing of a string that escapes escaped characters? - parsingFancybox - I don't need scrollbars - jqueryAndroid SearchView Hide keyboard at startup - androidPushStreamContent does not send a final fragment of zero length to signal the end of a stream - asp.netScreenUpdating = False does not work in Excel 2013 and 2016 - vbaProgrammatically publishing a Gmail project with both HTML and plaintext bodies specified by the user - pythonTSify ignores conversions during Browserify - javascriptAll Articles