Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

function IF with several equality conditions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49081] function IF with several equality conditions
  • From: mbekkali at gmail.com (Mukhtar Bekkali)
  • Date: Wed, 30 Jun 2004 05:34:26 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I have two questions that HELP file of Mathematica does not address:

(1) How do I implement IF with several conditions.  I tried something like this 

a=1;
Table[If[{x1>a,x2<a},0,1],{x1,0,2},{x2,0,2}]

and get no results.

Also, (2) IF does not accept equality conditions either, say

a=1;
Table[If[x=a,0,1],{x,0,2}]

I am surprised that such simple things are not covered by help file.

Thank you in advance, Mukhtar


  • Prev by Date: Re: options Transpose[] ?
  • Next by Date: Re: matrix times a vector
  • Previous by thread: Bug in parsing expression?
  • Next by thread: A question about derivatives of quadratic products