MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Using implicit information about row indices

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68323] Re: Using implicit information about row indices
  • From: "Ray Koopman" <koopman at sfu.ca>
  • Date: Tue, 1 Aug 2006 06:59:52 -0400 (EDT)
  • References: <eakcj6$qce$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In[1]:= L = {{{1, a}, {2, b}},
             {{1, c}, {2, d}, {3, e}, {4, f}},
             {{2, g}, {3, h}, {4, i}},
             {{3, k}, {4, l}, {5,m}},
             {{4, n}, {5, p}}};

In[2]:= Normal[SparseArray[ Rule @@@ #, {Length@L}]& /@ L]
Out[2]= {{a,b,0,0,0},
         {c,d,e,f,0},
         {0,g,h,i,0},
         {0,0,k,l,m},
         {0,0,0,n,p}}


  • Prev by Date: Re: Using implicit information about row indices
  • Next by Date: Re: need to make a special function
  • Previous by thread: Re: Using implicit information about row indices
  • Next by thread: Re: Using implicit information about row indices