From: <ad...@us...> - 2011-05-23 20:56:24
|
Revision: 8279 http://octave.svn.sourceforge.net/octave/?rev=8279&view=rev Author: adb014 Date: 2011-05-23 20:56:18 +0000 (Mon, 23 May 2011) Log Message: ----------- yet more updates of the communication package for Octave 3.4 Modified Paths: -------------- trunk/octave-forge/main/comm/inst/@galois/conv.m trunk/octave-forge/main/comm/inst/@galois/deconv.m trunk/octave-forge/main/comm/inst/bchpoly.m trunk/octave-forge/main/comm/inst/comms.m trunk/octave-forge/main/comm/inst/cosets.m trunk/octave-forge/main/comm/inst/minpol.m trunk/octave-forge/main/comm/inst/rsgenpoly.m Removed Paths: ------------- trunk/octave-forge/main/comm/inst/gfft.m Modified: trunk/octave-forge/main/comm/inst/@galois/conv.m =================================================================== --- trunk/octave-forge/main/comm/inst/@galois/conv.m 2011-05-22 19:32:41 UTC (rev 8278) +++ trunk/octave-forge/main/comm/inst/@galois/conv.m 2011-05-23 20:56:18 UTC (rev 8279) @@ -51,10 +51,10 @@ ## Ensure that both vectors are row vectors. if (rows (a) > 1) - a = greshape (a, 1, la); + a = reshape (a, 1, la); endif if (rows (b) > 1) - b = greshape (b, 1, lb); + b = reshape (b, 1, lb); endif ## Use the shortest vector as the coefficent vector to filter. @@ -66,7 +66,7 @@ else x = b; endif - y = gfilter (a, 1, x); + y = filter (a, 1, x); else if(ly > la) ## Can't concatenate galois variables like this yet @@ -75,7 +75,7 @@ else x = a; endif - y = gfilter (b, 1, x); + y = filter (b, 1, x); endif endfunction Modified: trunk/octave-forge/main/comm/inst/@galois/deconv.m =================================================================== --- trunk/octave-forge/main/comm/inst/@galois/deconv.m 2011-05-22 19:32:41 UTC (rev 8278) +++ trunk/octave-forge/main/comm/inst/@galois/deconv.m 2011-05-23 20:56:18 UTC (rev 8279) @@ -18,13 +18,13 @@ ## Deconvolve two Galois vectors. ## ## @code{[b, r] = deconv (y, a)} solves for @var{b} and @var{r} such that -## @code{y = gconv (a, b) + r}. +## @code{y = conv (a, b) + r}. ## ## If @var{y} and @var{a} are polynomial coefficient vectors, @var{b} will ## contain the coefficients of the polynomial quotient and @var{r} will be ## a remander polynomial of lowest order. ## @end deftypefn -## @seealso{gconv,deconv,conv} +## @seealso{conv} function [b, r] = deconv (y, a) @@ -70,11 +70,11 @@ lc = la + length (b) - 1; if (ly == lc) - r = y - gconv (a, b); + r = y - conv (a, b); else ## Can't concatenate galois variables like this yet - ## r = [(zeros (1, lc - ly)), y] - gconv (a, b); - r = gf([(zeros (1, lc - ly)), y], y.m, y.prim_poly) - gconv (a, b); + ## r = [(zeros (1, lc - ly)), y] - conv (a, b); + r = gf([(zeros (1, lc - ly)), y], y.m, y.prim_poly) - conv (a, b); endif endfunction Modified: trunk/octave-forge/main/comm/inst/bchpoly.m =================================================================== --- trunk/octave-forge/main/comm/inst/bchpoly.m 2011-05-22 19:32:41 UTC (rev 8278) +++ trunk/octave-forge/main/comm/inst/bchpoly.m 2011-05-23 20:56:18 UTC (rev 8279) @@ -145,7 +145,7 @@ for t=1:floor(n(ni)/2) for i=1:nc if (fc(i) != 1) - cl = glog(c{i}); + cl = log(c{i}); for j=2*(t-1)+1:2*t if (find(cl == j)) f = [f, c{i}.x]; @@ -182,14 +182,14 @@ f0 = f1; for i=1:nc if (fc(i) != 1) - cl = glog(c{i}); + cl = log(c{i}); for j=2*(t-1)+1:2*t if (find(cl == j)) f1 = [f1, c{i}.x]; fc(i) = 1; ptmp = gf([c{i}(1), 1], m, prim); for l=2:length(c{i}) - ptmp = gconv(ptmp, [c{i}(l), 1]); + ptmp = conv(ptmp, [c{i}(l), 1]); end f = [f; [ptmp.x, zeros(1,m-length(ptmp)+1)]]; fl = fl + length(ptmp); @@ -216,7 +216,7 @@ p = gf([f0(1), 1], m, prim); for i=2:length(f0) - p = gconv(p, [f0(i), 1]); + p = conv(p, [f0(i), 1]); end p = p.x; Modified: trunk/octave-forge/main/comm/inst/comms.m =================================================================== --- trunk/octave-forge/main/comm/inst/comms.m 2011-05-22 19:32:41 UTC (rev 8278) +++ trunk/octave-forge/main/comm/inst/comms.m 2011-05-23 20:56:18 UTC (rev 8279) @@ -565,7 +565,7 @@ if (!isequal(y0,y1)) error("FAILED"); endif - roots1 = groots(poly1); + roots1 = roots(poly1); ck1 = polyval(poly1, roots1); if (any(ck1)) error("FAILED"); @@ -590,7 +590,7 @@ if (any(l*u-p*gmat)) error("FAILED"); endif - g1 = ginv(gmat); + g1 = inv(gmat); g2 = gmat ^ -1; if (any(g1*gmat != eye(matlen))) error("FAILED"); Modified: trunk/octave-forge/main/comm/inst/cosets.m =================================================================== --- trunk/octave-forge/main/comm/inst/cosets.m 2011-05-22 19:32:41 UTC (rev 8278) +++ trunk/octave-forge/main/comm/inst/cosets.m 2011-05-23 20:56:18 UTC (rev 8279) @@ -34,7 +34,7 @@ c{1} = gf(1,m,prim); found(1) = 1; nc = 2; - f = glog(gf(1:n,m,prim)); + f = log(gf(1:n,m,prim)); while ((!all(found))) t = find(!found); @@ -45,7 +45,7 @@ set =[set,r]; r = rem(r*2,n); end - c{nc} = gf(sort(gexp(gf(set,m,prim)).x),m,prim); + c{nc} = gf(sort(exp(gf(set,m,prim)).x),m,prim); found(c{nc}.x) = ones(1,length(c{nc})); nc = nc + 1; end Deleted: trunk/octave-forge/main/comm/inst/gfft.m =================================================================== --- trunk/octave-forge/main/comm/inst/gfft.m 2011-05-22 19:32:41 UTC (rev 8278) +++ trunk/octave-forge/main/comm/inst/gfft.m 2011-05-23 20:56:18 UTC (rev 8279) @@ -1,52 +0,0 @@ -## Copyright (C) 2002 David Bateman -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Function File} {} gfft (@var{x}) -## -## If @var{x} is a column vector, finds the FFT over the primitive element -## of the Galois Field of @var{x}. If @var{x} is in the Galois Field -## GF(2^@var{m}), then @var{x} must have @code{2^@var{m} - 1} elements. -## @end deftypefn -## @seealso{fft} - -## PKG_ADD: dispatch ("fft", "gfft", "galois"); -function y = gfft(x) - - if (nargin != 1) - error ("usage: y = gfft (x)"); - endif - - if (!isgalois(x)) - error("gfft: argument must be a galois variable"); - endif - - n = 2^x.m - 1; - if (n > 255) - error ([ "gfft: argument must be in Galois Field GF(2^m), where", ... - " m is not greater than 8"]); - endif - - alph = gf(2, x.m, x.prim_poly); - [nr,nc] = size(x); - if ((nc == 1) && (nr == n)) - y = gdftmtx(alph) * x; - elseif ((nc == n) && (nr == 1)) - y = (gdftmtx(alph) * x')'; - else - error ("gfft: argument must be a vector in GF(2^m) of length 2^m-1"); - endif - -endfunction Modified: trunk/octave-forge/main/comm/inst/minpol.m =================================================================== --- trunk/octave-forge/main/comm/inst/minpol.m 2011-05-22 19:32:41 UTC (rev 8278) +++ trunk/octave-forge/main/comm/inst/minpol.m 2011-05-23 20:56:18 UTC (rev 8279) @@ -61,7 +61,7 @@ ## Create the minimum polynomial from its roots ptmp = gf([1,rv(1)], m, prim_poly); for i=2:length(rv) - ptmp = gconv(ptmp, [1,rv(i)]); + ptmp = conv(ptmp, [1,rv(i)]); end ## Need to left-shift polynomial to divide by x while can Modified: trunk/octave-forge/main/comm/inst/rsgenpoly.m =================================================================== --- trunk/octave-forge/main/comm/inst/rsgenpoly.m 2011-05-22 19:32:41 UTC (rev 8278) +++ trunk/octave-forge/main/comm/inst/rsgenpoly.m 2011-05-23 20:56:18 UTC (rev 8279) @@ -145,7 +145,7 @@ g = gf(1, m, prim); for i= 1:2*t - g = gconv(g, gf([1,alph^((b+i-1)*s)], m, prim)); + g = conv(g, gf([1,alph^((b+i-1)*s)], m, prim)); end endfunction This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |