[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## rank(gf) doesn't really work?

**From**: |
Lapo Luchini |

**Subject**: |
rank(gf) doesn't really work? |

**Date**: |
Tue, 11 Oct 2005 11:13:30 +0000 (UTC) |

**User-agent**: |
Loom/3.14 (http://gmane.org/) |

Maybe I'm missing some important point (e.g. "gfrank" is not defined) and this
is really not supported, but it gives different result on gf() than on a normal
array so just maybe it shuold work..?
$ B=gf([0,1,0,0,1,1;
0,0,1,1,1,0;
0,1,1,1,0,0;
1,0,1,1,0,0;
1,1,0,1,0,0;
1,1,1,0,0,0]);
$ D=gf([0,1,0,0,1,1;
0,0,1,1,1,0;
0,1,1,1,0,0;
1,0,1,1,0,0;
1,1,0,1,0,0;
0,1,1,0,0,0]);
$ B+D
ans =
GF(2) array.
Array elements =
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
1 0 0 0 0 0
$ rank(B)
ans = 6
$ rank(D)
ans = 4
Then, if B is full-rank (6 out of 6) how can possibly D be rank 4 if the first 5
lines are the very same 5 lines that in B were linearly independent?
It just seems that it works, but only on square matrices, and it just ignores
any other column:
$ rank(B(1:5,1:5))
ans = 4
$ rank(B(1:5,2:6))
ans = 5
$ rank(B(1:5,:))
ans = 4
I would expect last line to be 5 as well. Maybe rank(B(1:5,:)) just uses the
first 5 columns in the 5x6 matrix?
Mhh...?
Lapo
--
Lapo Luchini
address@hidden (OpenPGP & X.509)
www.lapo.it (ICQ UIN: 529796)
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------

**rank(gf) doesn't really work?**,
*Lapo Luchini* **<=**