Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

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: [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



  • Prev by Date: Random Geometric
  • Next by Date: The most efficient Fibonacci algorithim?
  • Previous by thread: Could we build matrix with codition instruction?
  • Next by thread: Re: Could we build matrix with codition instruction?