From bug-octave-request at bevo dot che dot wisc dot edu Tue Oct 24 17:04:17 2000 Subject: create_set ([n, n]) gives empty matrix warning From: Mats Jansson To: bug-octave at bevo dot che dot wisc dot edu Date: Wed, 25 Oct 2000 00:06:21 +0200 Bug report for Octave 2.1.31 configured for %OCTAVE_CANONICAL_HOST_TYPE% Description: ----------- create_set ([n, n]) gives empty matrix warning if empty_list_elements_ok = "warn" Repeat-By: --------- create_set ([0, 0]) Fix: --- 48c48,53 < y = y ([1, (find (y(1:nelx-1) != y(2:nelx)) + 1)]); --- > els = find (y(1:nelx-1) != y(2:nelx)); > if (isempty (els)); > y = y(1); > else > y = y([1, els+1]); > endif ------------------------------------------------------------- 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 -------------------------------------------------------------