[SciPy-user] Structured matrices

Barry Drake bldrake@adaptcs....
Tue Mar 13 12:44:00 CDT 2007


Nils,
Does this matrix come from a particular application?  I'm working on algorithms for the non-negative matrix factorization (NMF).  With this matrix as input I'm getting some very strange results.  So I'm curious about potential applications.

Cheers!
Barry L. Drake
GA Tech

Nils Wagner wrote: Hi all,

I was wondering if the matrix family (see below) has a special name ?
And/or is there a way to construct this matrix via special matrices
(like Hankel, Toeplitz, etc.) ?


[[ 3.  1.]
 [ 1.  1.]]

[[ 5.  3.  1.]
 [ 3.  3.  1.]
 [ 1.  1.  1.]]

[[ 7.  5.  3.  1.]
 [ 5.  5.  3.  1.]
 [ 3.  3.  3.  1.]
 [ 1.  1.  1.  1.]]

[[ 9.  7.  5.  3.  1.]
 [ 7.  7.  5.  3.  1.]
 [ 5.  5.  5.  3.  1.]
 [ 3.  3.  3.  3.  1.]
 [ 1.  1.  1.  1.  1.]]

Nils

from scipy import *

def M(n):

    tmp = ones((n,n))
    for k in arange(n,0,-1):
        tmp[:k-1,:k-1] = tmp[:k-1,:k-1] + 2
    return tmp

for n in arange(2,8):
    print M(n)
    print
     
_______________________________________________
SciPy-user mailing list
SciPy-user@scipy.org
http://projects.scipy.org/mailman/listinfo/scipy-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070313/522cc81a/attachment.html 


More information about the SciPy-user mailing list