Søren Hauberg wrote: > Hi > > tor, 16 07 2009 kl. 17:34 +0200, skrev Christian Neumair: > >> the attached patch fixes qamdemod(). Its purpose is to provide a >> nearest-neighbour quantizer against a pre-defined set of points (called >> QAM signal space constellations). >> > > This patch looks good to me, so I applied it. > > >> It still features a loop which is not pre-compiled >> >> for k = 1:numel(y) >> [n z(k)] = min(abs(y(k) - x)) >> end >> >> but the only way that this could be vectorized is by converting the >> input data to a vector, processing it and converting it back to a >> matrix/multi-dimensional array again with something like >> >> a=y(:); >> b=min(abs(repmat(a,[1 m]) - x)) >> z=reshape(x,size(y); >> >> and I am not sure whether this is wise from a speed and memory usage >> POV. Maybe this nearest-neighbour quantization loop could/should be >> moved into a builtin function? >> > > I'm not a user of this package, so I'm probably asking a stupid question > here, but does this constitute a performance bottle-neck for real > applications? If so, then it might be sensible to a C++ version of this > code. From a maintenance point-of-view, I'd rather like to avoid this > though... > > Søren > > > qammod and qamdemod need to be reworked to allow 8QAM, 32QAM, etc which are non-symmetric gray mappings. The qaskenco and qaskdeco function already have this but are superceded in matlab by qammod and qamdemod, so it would make sense to make these call the same underlying code. The versions in qaskenco and qaskdeco were fairly well optimized at the time I wrote them so this code might serve as a basis, but it probably makes sense to check that the same gray mappings are used in the matlab versions of qaskenco and qammod before doing this.. See the thread
http://www.nabble.com/qammod-proposed-update-to24420799.html that proposed some code as well. D. -- David Bateman dbate...@dbateman.org 35 rue Gambetta +33 1 46 04 02 18 (Home) 92100 Boulogne-Billancourt FRANCE +33 6 72 01 06 33 (Mob) ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev