Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Problem defining assumptions on a set of variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58073] Re: Problem defining assumptions on a set of variables
  • From: dh <dh at metrohm.ch>
  • Date: Fri, 17 Jun 2005 05:20:36 -0400 (EDT)
  • References: <d8riof$ihp$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Erik,
see below,
Daniel

Koffijberg, H. wrote:
> Hi all,
> 
> I have encountered two problems using Mathematica v5.0 with parameters
> for which no value is defined but for which some assumptions are defined.
> I do not understand why each of the following statements return -1.
> 
> Assuming[q\[Element]Reals&&q>0&&q<1, If[q > 3, 1, 0, -1]]
> Refine[If[q > 3, 1, 0, -1],q\[Element]Reals&&q>0&&q<1]
Assuming has no effect on "If[..]" only on functions like: Simplify,.. 
see manual. Therefore, "If" does his job without knowning about the 
assumptions, decides that q is not defined and returns -1.

> 
> I would expect to get 0 as return value. What am I missing here ?
> In addition I would like to define a fairly large matrix (e.g. 100x100)
> in which each entry consists of a variable of unknown value. Something like:
> [ p11   p12   p13,   p14,   ... , p1100    ]
> [ p21   p22   p23,   p24,   ... , p2100    ]
>  ...
> [ p1001 p1002 p1003, p1004, ... , p100100  ]
Array is made for this job. E.g.
Array[p,{100,100}]
You assigne a value to an element by e.g.:
p[3,4]=5

>  
> with pij the variable on row i column j. Any ideas on how to define such
> a matrix without defining any values for the pij but with the added assumption
> that 0 <= pij <= 1 for all the pij's ? 
> I want to use this matrix for computations in which I will provide values
> for some of the variables and not provide values for the remaining variables
> so that the result is expressed in terms of the undefined variables. However
> the sets of defined / undefined variables will not be fixed so I'm looking for
> a flexible solution.
> 
> Any help will be greatly appreciated.
> Erik Koffijberg.
> 


  • Prev by Date: Re: Problem defining assumptions on a set of variables
  • Next by Date: usage messages in packages
  • Previous by thread: Re: Problem defining assumptions on a set of variables
  • Next by thread: field line with NDSolve