MathGroup Archive 2000

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

Search the Archive

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


  • Prev by Date: Color Fill areas in 2D graphic
  • Next by Date: Re: Follow-up on Do[] Question
  • Previous by thread: Re: Could we build matrix with codition instruction?
  • Next by thread: RE: Could we build matrix with codition instruction?