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

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

Search the Archive

Re: numerics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27270] Re: numerics
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 17 Feb 2001 03:30:42 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <96iqph$d9j@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

don't mix symbolic algorithms with floating point numbers.

The following will help

Reduce[Thread[newmat.{x1, x2, x3} == {0, 0, 0}] /. 
      x_Real :> Rationalize[x], {x1, x2, x3}] // N

How ever, the behaviour is a feature of Mathematica ;-)
Regards
  Jens

Matt.Johnson at autolivasp.com wrote:
> 
> mathematica gurus--
> 
> Here's a frustrating problem, which seems to be simple.  I can calculate a
> matrix by hand and enter it into Solve or Reduce and get the correct
> relationships:
> 
> In[108]:=
> mat = Partition[{-0.2, 0.1, 0, 0.1, -0.3, 0.1, 0.1, 0.2, -0.1}, 3];
> Reduce[mat.{x1, x2, x3} == {0, 0, 0}, {x1, x2, x3}]
> Out[109]=
> x1 == 0.5 x2 && x3 == 2.5 x2
> 
> However, if I try to manipulate the matrix in Mathematica then solve, it doesn't work:
> 
> In[110]:=
> mat1 = Partition[{0.8, 0.1, 0.1, 0.1, 0.7, 0.2, 0, 0.1, 0.9}, 3];
> imat = IdentityMatrix[Length[mat1]];
> newmat = Transpose[mat1] - imat;
> In[113]:=
> newmat == mat
> Out[113]=
> True
> In[114]:=
> newmat === mat
> Out[114]=
> False
> In[115]:=
> Reduce[newmat.{x1, x2, x3} == {0, 0, 0}, {x1, x2, x3}]
> Out[115]=
> x1 == 0. && x2 == 0. && x3 == 0.
> 
> any input?
> 
> -matt


  • Prev by Date: Re: How can I find the closest distance between a specified point and an interpolation curve?
  • Next by Date: Re: matrices & polynomials in mathematica
  • Previous by thread: Out of Memory. Exiting.
  • Next by thread: Re: numerics