RE: Could we build matrix with codition instruction?
- To: mathgroup at smc.vnet.net
- Subject: [mg23346] RE: [mg23314] Could we build matrix with codition instruction?
- From: "Higinio Ramos Calle" <higra at gugu.usal.es>
- Date: Thu, 4 May 2000 02:59:14 -0400 (EDT)
- References: <200005012200.SAA26828@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
----- Original Message ----- From: Coase Yang <cnc at ms6.hinet.net> To: mathgroup at smc.vnet.net Subject: [mg23346] [mg23314] Could we build matrix with codition instruction? > Dear All: > > I want to construct an 4*4 upper triangular matrix with > conditional instruction, a[i,j]: > if j-i>=0, then a[[i,j]]=1 > if j-i<0, then a[[i,j]]=0 > Could anyone tell me how I could build this matrix with > list or Table form by conditional instruction inside? > > Thank you very much. > > Coase Yang This is the matrix you want: M=Table[If[j>i, 1, 0],{i,4},{j,4}] Higinio Ramos
- References:
- Could we build matrix with codition instruction?
- From: Coase Yang <cnc@ms6.hinet.net>
- Could we build matrix with codition instruction?