Speed up gf(eye(x)) a.k.a. Speed up Galois field creation for sparse matrices

From the documentation (communications toolbox)

x_gf = gf(x,m) creates a Galois field array from the matrix x. The Galois field has 2^m elements, where m is an integer between 1 and 16.

Fine. The effort for big matrices grows with the number of elements of x. No surprise, as every element must be "touched" at some point.

Unfortunately, this means that the costs of gf(eye(n)) throw quadratically with n. Is there a way to profit from all the zeros in there?

PS: I need this to delete a row from a gf-Matrix, as the usual m(:c)= [] way does not work, and my idea of multiplying a gf-matrix with a cut unity matrix was surprisingly slow..

Answers


I don't have this toolbox, but maybe gf supports sparse-data inputs, which could drastically reduce your execution time in such a case.


Need Your Help

TortoiseHg update fails with "Access is denied", how to work around that?

mercurial tortoisehg

I've pulled in some changes to read-only files from a remote repository and I'm trying to update my working area, but I get [Errno 13] ... Access is denied errors when TortoiseHg tries to update th...

PHP Libraries/Classes that helped you easy using REST with JSON?

php json facebook rest

I would like to know what existing PHP libraries/classes have you used for your REST+JSON projects.