[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45497] missing function: repelem
From: |
Nick Jankowski |
Subject: |
[Octave-bug-tracker] [bug #45497] missing function: repelem |
Date: |
Thu, 09 Jul 2015 06:02:35 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0 |
Follow-up Comment #4, bug #45497 (project octave):
yes, understand. I've played with it a bit this evening. attached a modified
version.
I dropped in my non-repmat versions for scalar v, as they were nice one-line
replacements. Also changed some of the length checking to 'isscalar' 'isrow'
'isvector', etc, for same performance reasons.
I noticed the multi-dimensional array part might throw some problems. Tested a
bit on ML. for a nD array (anything bigger than a row or column vector),
number of input arguments must = n+1. each one can either be a scalar or a
vector specifying reps in that direction. seems to work for arbitrary n.
currently a scalar v but array element gets past the first if-else set, so I
added a catch there.
The else-if for the vector element and vector v would give true on an array
with the first range having the same length() (say a 2x2 A with a 2x1 v), but
would give a blank output. added an isvector() there to prevent that so it
should pass to the next conditional for arrays.
1 or two other comments addded. will peek at it a bit more tomorrow.
(file #34400)
_______________________________________________________
Additional Item Attachment:
File name: repelem.m Size:2 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45497>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Nick Jankowski, 2015/07/08
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Markus Bergholz, 2015/07/08
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Nick Jankowski, 2015/07/08
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Markus Bergholz, 2015/07/09
- [Octave-bug-tracker] [bug #45497] missing function: repelem,
Nick Jankowski <=
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Nick Jankowski, 2015/07/09
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Carnë Draug, 2015/07/09
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Nick Jankowski, 2015/07/09
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Markus Bergholz, 2015/07/09
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Markus Bergholz, 2015/07/11
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Markus Bergholz, 2015/07/11
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Nick Jankowski, 2015/07/21
- [Octave-bug-tracker] [bug #45497] missing function: repelem, Nick Jankowski, 2015/07/26