Re: Could we build matrix with codition instruction?
- To: mathgroup at smc.vnet.net
- Subject: [mg23333] Re: Could we build matrix with codition instruction?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 4 May 2000 02:59:04 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <8ekvji$qa7@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, Table[If[j - i >= 0, 1, 0], {i, 4}, {j, 4}] ? Regards Jens Coase Yang wrote: > > 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