From octave-sources-request at bevo dot che dot wisc dot edu Sun Mar 3 09:23:44 2002 Subject: patch for repmat.m From: Schloegl Alois To: octave-sources at bevo dot che dot wisc dot edu Cc: pkienzle at kienzle dot powernet dot co dot uk Date: Sun, 03 Mar 2002 16:22:59 +0100 (MET) Bug report on repmat.m in http://users.powernet.co.uk/kienzle/octave/matcompat-2001.02.25.tar.gz and in http://users.powernet.co.uk/kienzle/octave/matcompat/scripts/general/repmat.m Description: ------------- isscalar is not part of the standard octave distribution. Repeat by: ---------- octave:14> repmat(10,[1,3]) error: `isscalar' undefined near line 34 column 8 error: evaluating index expression near line 34, column 8 error: if: error evaluating conditional expression error: evaluating if command near line 34, column 5 error: evaluating if command near line 33, column 3 error: called from `repmat' in file `.../matcompat/general/repmat.m' Solution: ----------- isscalar should be replaced by is_scalar. Alois BTW: I'd suggest to include repmat.m into the standard Octave distribution e.g. to /octave/2.1.35/m/general/repmat.m *** repmat.m Mon Feb 25 19:10:15 2002 --- matcompat/general/repmat.m Mon Jan 15 12:51:50 2001 *************** *** 31,37 **** endif if nargin == 2 ! if is_scalar (m) n = m; elseif (is_vector (m) && length (m) == 2) n = m (2); --- 31,37 ---- endif if nargin == 2 ! if isscalar (m) n = m; elseif (is_vector (m) && length (m) == 2) n = m (2);