From help-octave-request at bevo dot che dot wisc dot edu Mon Nov 5 06:32:08 2001 Subject: letting find search for zeros From: Hendrik Naumann To: Help-Octave Date: Mon, 5 Nov 2001 11:02:07 +0100 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Does anybody know a function that returns the indices of the zero elements of an vector? The solution I found is octave-2.1.34:13> val = [1,3,0,1,0]; octave-2.1.34:14> find(isnan( val / 0)) ... ans = 3 5 That gives an ugly warning, so I am looking for an better solution. Hendrik Naumann - -- PGP ID 21F0AC0265C92061 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE75mOrIfCsAmXJIGERAmB8AJ9xVLizKhZuhLqEKzaFuQNqGZ/K2ACeOeKI xB1rWXL0Xiz97xOyOg90dhk= =0vMI -----END PGP SIGNATURE----- ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------